Libraries not imported when creating Python executable with pyinstaller

I am trying to create Python.exe for Windows and can create it. However, when I launch the application, I notice that it cannot perform all its functions, because not all libraries were imported; PySNMP is not imported separately. When I look at the result of the build process, I notice that PySNMP is not specified at all, although some modules in my program import it. Does anyone know what might cause this problem? Thank!

Here is the code that the installer creates:

FILES = <main program modules (.py)> 
PyInstaller = C:/Python27/pyinstaller 
CygPyInstaller = /cygdrive/c/Python27/pyinstaller run : python app.py makespec : $(FILES) @echo "***** PyInstaller: Makespec *****" python $(PyInstaller)/Makespec.py \
 --onefile \
 --windowed \ 
 --icon=Icons/icon.ico \
 --name=Application1045 \ 
 app.py
+3
source share
1 answer

(, , ./lib/ ), --paths=lib pyinstaller - sys.path.append( "lib" ) ( , , , , , ...)

+1

Source: https://habr.com/ru/post/1773308/


All Articles