Pyinstaller "Failed to execute script pyi_rth_pkgres" and missing packages Pyinstaller "Failed to execute script pyi_rth_pkgres" and missing packages python python

Pyinstaller "Failed to execute script pyi_rth_pkgres" and missing packages


same problem here:

  • OS: Win10
  • Python: 3.7
    • pyinstaller installed by pip install pyinstaller

fix by (same solution with above, by no need download):

pip uninstall pyinstallerpip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip


Extending Vikash Kumar's answer, build the application by adding the --hidden-import argument to the command.

For example, running the command given below worked for me.

"pyinstaller --hidden-import=pkg_resources.py2_warn example.py"

update: added missing "="


Adding the line:

import pkg_resources.py2_warn

to my code helped.