3

I am trying to convert a python script to .exe using PyInstaller. The script is converted to an exe without any error logs.

However while running the .exe file am getting ModuleNotFoundError: No module named 'srsly.msgpack.util'

The issue is occurring while opening the exe files generated both by PyInstaller and cx_Freeze. The Screenshot of the error is attached here.

Have tried updating, un-install and re-installing of packages, but still the issue persists.

Versions:

  • Python : 3.7
  • OS : Windows 10
  • cx_Freeze : 6.0
  • msgpack : 0.6.2
  • PyInstaller : 3.5
  • srsly : 0.1.0
Bill
  • 103
  • 2
  • 7
Rocky
  • 45
  • 1
  • 10

2 Answers2

5

When PyInstaller evaluated your script, it did not predict the dependency on srsly.msgpack.util. You can manually specify dependencies using --hiddenimport.

    pyinstaller --hiddenimport srsly.msgpack.util your_script.py

You may find that fixing this problem just reveals another. You can add as many --hiddenimport hints as you need.

Bill
  • 103
  • 2
  • 7
0

The issue is mentioned here: https://pypi.python.org/pypi/msgpack/0.5.1

When upgrading from msgpack-0.4 or earlier, don’t do pip install -U msgpack-python. Do pip uninstall msgpack-python; pip install msgpack instead.

  • I had tried this as well, but couldn't resolve the issue. pip uninstall msgpack-python gives 'WARNING: Skipping msgpack-python as it is not installed.' --------- Thanks – Rocky Sep 30 '19 at 11:50