Imported module not found in PyInstaller

If you are using virtualenv you should use the “-p” or “–path=”D:…”” option. Like this:

pyinstaller.exe --onefile --paths=D:\env\Lib\site-packages  .\foo.py

What this does is generates foo.spec file with this pathex path

Leave a Comment