首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在python 2上安装pyinstaller

无法在python 2上安装pyinstaller
EN

Stack Overflow用户
提问于 2021-03-31 20:23:07
回答 2查看 1.1K关注 0票数 1
代码语言:javascript
复制
    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.

在windows和linux上都无法在python 2上安装pyinstaller。说类似的错误。我需要编译一个写在python2上的代码。有没有主体出现同样的错误?请帮帮忙

EN

回答 2

Stack Overflow用户

发布于 2021-03-31 20:27:14

最新版本的pyinstaller不支持Python2.7,如Requirements中所述。

要使Python 2.7正常工作,必须安装3.6版。

票数 2
EN

Stack Overflow用户

发布于 2021-03-31 20:28:25

首先,您应该升级您的python版本,并且您正在导入未安装的包,因此首先使用pip install importlib进行安装。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66887826

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档