2

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?

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
adong
  • 29
  • 1
  • 2
  • 3
    Welcome to StackOverflow! Please read the info about [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and [how to give a reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). This will make it much easier for others to help you. – Aditi Mar 28 '18 at 05:11

1 Answers1

10

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

Pedro
  • 201
  • 4
  • 8