-
[Python] Window에서의 multiprocessing문제공부/Python 2019. 7. 2. 17:58
ocr관련 프로젝트 진행중에 분명히 돌아갔던 코드가 계속 문제가 되길래 한참을 붙잡다가... 이 현상이 가상환경을 사용할 때 (venv) linux와 window 간의 fork에 관한 차이점(child process 관련.. 아무튼 비슷한) 에 의해서 문제가 있다는 것을 알게 되었다.
나같은 경우는 freezing 현상이 발생했는데, 한참을 찾아 해매다가 일단은 이런 결과로 임시적으로 판단을 내리기로 하였다.(조금 더 조사해볼 여지가 있어보이기 때문에)
사실 이 문제는 3.7~ 부터 해결이 되었다고 하지만[아직 실제 돌려서 확인해보지는 않았습니다.], ocr 을 진행할때 안정성이나 몇몇 호환성이 문제가 되는 경우가 많아 보통 3.6을 많이 추천하다보니, 하드한 작업을 돌릴때 고속화가 가능해지는 multiprocessing이 문제가 되는건 너무 뼈아프다.
환경구축한것도 솔직히 오래됐고... 지금은 3.6이상의 버젼을 사용해도 잘 돌아가는지는 모르겠다.
한번 버전업을 해보고 다시 확인을 하는 것으로...
[참조] : https://bugs.python.org/issue35797
Issue 35797: concurrent.futures.ProcessPoolExecutor does not work in venv on Windows - Python tracker
Using concurrent.futures.ProcessPoolExecutor on Windows fails immediately with a lot of exceptions of the "access denied", "file not found", and "invalid handle" varieties. Running the script that creates the ProcessPoolExecutor from the main system-wide i
bugs.python.org
[참조] : https://bugs.python.org/issue6461
Issue 6461: multiprocessing: freezing apps on Windows - Python tracker
Issue6461 Created on 2009-07-11 06:08 by sgm, last changed 2015-03-05 18:03 by davin. This issue is now closed. msg90405 - (view) Author: Stuart Mentzer (sgm) Date: 2009-07-11 06:08 Freezing apps with multiprocessing on Windows seems to be broken. First, i
bugs.python.org
항상 문제가 생기면 해결하기 위해서 검색을 할 때마다 느끼는 거지만,
내가 못찾은건지 없는건지 찾은게 잘못된건지 너무 혼란스럽다.
없는것을 증명하는 것은 불가능한 느낌이랄까
'공부 > Python' 카테고리의 다른 글
[Python] interpreter 설정시 anaconda installation is not found (0) 2019.07.02 [Python] 실행시 argv에 default 값을 주고 싶을 경우 (0) 2019.07.02