Pyinstaller importerror:the ' packaging ' package is required; ...

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.