PyInstaller에서 sklearn 연관 문제 해결 방법

2021. 10. 7. 02:54서버 프로그래밍

(1) pyinstaller로 빌드시 skleran을 사용하는 경우 필요한 DLL 파일이 자동으로 추가되지 않는 문제 발생

-> pyinstaller로 빌드 후, 필요한 DLL 파일들을 .../sklearn/.libs 폴더를 만들고 복사해주면 됨

(2) dll 문제 해결후, 실행시 특정 모듈이 발견되지 않는다는 문제 발생

-> hiddenimports 옵션에 발견하지 못했다는 모듈을 수동으로 명시 (3~4번 정도 반복하며 필요한 모듈 모두 등록해야 함)하면 됨

https://developpaper.com/solution-to-flash-back-problem-of-exe-generated-by-pyinstaller/

 

Solution to flash back problem of exe generated by pyinstaller - Develop Paper

Simple module problem Ifpyinstaller project.pyIn the process of, appear: No module named 'xxx' Thenpip install xxxJust like: $ pip install wxPython pypiwin32 tornado This PIP corresponds to the virtual environment of the project.Where wxpthon corresponds t

developpaper.com

 

pyinstaller 옵션 관련

https://pyinstaller.readthedocs.io/en/v3.3.1/usage.html#using-upx

 

Using PyInstaller — PyInstaller 3.3.1 documentation

Docs » Using PyInstaller Edit on GitHub Using PyInstaller The syntax of the pyinstaller command is: pyinstaller [options] script [script …] | specfile In the most simple case, set the current directory to the location of your program myscript.py and exe

pyinstaller.readthedocs.io

 

hiddenimports 관련 자료

 

https://stackoverflow.com/questions/48712154/pyinstaller-warning-lib-not-found

 

PyInstaller WARNING: lib not found

I know this type of question has been asked here before, but I did not find a working solution to it. I have a python file which I want to convert to an exe on Windows 10. I ran pyinstaller --onefi...

stackoverflow.com

https://stackoverflow.com/questions/49559770/how-do-you-resolve-hidden-imports-not-found-warnings-in-pyinstaller-for-scipy

 

How do you resolve 'hidden imports not found!' warnings in pyinstaller for scipy?

I'm working on using pyinstaller to create an .exe for a python program that uses pandas and sklearn. The pyinstaller process completes and produces the dist folder with the executable as expected.

stackoverflow.com

 

excludes 옵션은 지정한 라이브러리를 통째로 포함하지 않고 빌드하는 것이라 문제 해결에 도움이 안됨

https://stackoverflow.com/questions/4890159/python-excluding-modules-pyinstaller

 

Python: Excluding Modules Pyinstaller

I've begun using Pyinstaller over Py2Exe. However I've rather quickly run into a problem. How do I exclude modules that I don't want, and how do I view the ones that are getting included into the s...

stackoverflow.com

https://stackoverflow.com/questions/38811966/error-when-creating-executable-file-with-pyinstaller

 

Error when creating executable file with pyinstaller

I'm trying to create an exe for my python script using pyinstaller each time it runs into errors which can be found in a pastebin here. Also when I double click the exe file it shows this error: ...

stackoverflow.com