简体   繁体   中英

Can't install pyinstaller on python 2

    pip2 install pyinstaller 
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.                                                                                     
Collecting pyinstaller
  Using cached pyinstaller-4.1.tar.gz (3.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpXfz8sO            
       cwd: /tmp/pip-install-VoIwF7/pyinstaller                                                                                                              
  Complete output (4 lines):                                                                                                                                 
  Traceback (most recent call last):                                                                                                                         
    File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 16, in <module>                                                    
      from importlib import import_module                                                                                                                    
  ImportError: No module named importlib                                                                                                                     
  ----------------------------------------                                                                                                                   
ERROR: Command errored out with exit status 1: /usr/bin/python2 /usr/local/lib/python2.7/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpXfz8sO Check the logs for full command output.

on both windows and linux unable to install pyinstaller on python 2. Say similar error. I need to compile a code written on python 2. Any body occur same error? Please help

The latest version of pyinstaller does not support Python 2.7, as described under Requirements .

For Python 2.7 to work, you must install version 3.6.

First of all, you should upgrade your python version and here you are importing the package that is not installed so install first using pip install importlib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM