简体   繁体   English

无法在 python 2 上安装 pyinstaller

[英]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.在 windows 和 linux 上都无法在 python 上安装 pyinstaller 2. 说类似的错误。 I need to compile a code written on python 2. Any body occur same error?我需要编译写在 python 上的代码 2. 任何机构出现同样的错误? Please help请帮忙

The latest version of pyinstaller does not support Python 2.7, as described under Requirements .要求中所述,最新版本的 pyinstaller 不支持 Python 2.7。

For Python 2.7 to work, you must install version 3.6.要使 Python 2.7 工作,您必须安装 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首先,您应该升级您的 python 版本,在这里您要导入未安装的 package,因此首先使用 pip install importlib

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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