Reputation: 29
I wrote a tool with an interface with PyQt5+Python3.6, and I want to pack into an .exe file to run on a machine without a Python environment. According to the online use of pyinstaller to pack, after the end of the package in the dist folder exe file is opened after the error:
ModuleNotFoundError: No module named 'scipy._lib.messagestream'
This issue was revised after the hiddenimports of the .spec file was resolved:
hiddenimports=['scipy._lib.messagestream']
and then the new .exe file generated by the command:
pyinstaller x.spec
still reports an error.
ModuleNotFoundError: No module named 'typedefs'
Then, continue to add ... continue to error, all this error...
How do you solve this problem?
Upvotes: 2
Views: 5418
Reputation: 221
Are you working in a virtual environment (venv)? If so, you should add the site-packages path:
pyinstaller --paths path\to\venv\Lib\site-packages script.py
It happens to me with selenium module until I run pyinstaller with the --paths
Upvotes: 10