Danil Solovyov2016-09-23 17:26:38
Danil Solovyov, 2016-09-23 17:26:38

After compiling a Python script through pyinstaller, an error pops up, how to fix it?

Traceback (most recent call last):
  File "site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 11, in <module>
  File "c:\anaconda\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
    exec(bytecode, module.__dict__)
  File "site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 68, in <module>
  File "site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\extern\__init__.py", line 60, in load_module
ImportError: The 'packaging' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.
Failed to execute script pyi_rth_pkgres

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Danil Solovyov, 2016-10-15

Solution: https://github.com/pyinstaller/pyinstaller/issues/2137

chihuy, 2020-05-07

I managed to solve the problem by installing the developer branch package.
A simple solution for those who do not know.
in cmd or powershall :

pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

Everything has been fixed. Used pygame, made a simple toy. Who can help you can thank me with the word "thank you" in the comments :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question