Run the Pyinstaller packaged application on the python2.6.6 error importerror:the ' packaging ' package is required; Normally this are bundled with this package so if you have this warning, consult the packager of your distribution. Problem Description
Run the following error with the Pyinstaller packaged application on the python2.6.6
Traceback (most recent):
File "<string>", line one, in <module>
File "c:\python27\Lib\ site-packages\pyinstaller\loader\pyimod03_importers.py ", line 389, in Load_module
exec (bytecode, module.__diact (__)
file "site-packages\pkg_resources\__init__.py", line, <module>
file "Site-packages\pkg_ resources\extern\__init__.py ", line, in Load_module
importerror:the ' packaging ' package is required; normally thi S is bundled with this package so if you are this warning, consult the packager of your distribution.
Pyi_rth_pkgres returned-1
Solutions
Using the PIP list to view the packages that have been installed, it is found that the Setuptools package version is too high and the Setuptools version in the environment is 20.x.x.
Decisively uninstall and install the lower version of Setuptools (19.2), as follows:
Pip Uninstall setuptools
pip install setuptools==19.2
Re-pack Python scripts to run again, problem solved.