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上的代码。有没有主体出现同样的错误?请帮帮忙
发布于 2021-03-31 20:27:14
最新版本的pyinstaller不支持Python2.7,如Requirements中所述。
要使Python 2.7正常工作,必须安装3.6版。
发布于 2021-03-31 20:28:25
首先,您应该升级您的python版本,并且您正在导入未安装的包,因此首先使用pip install importlib进行安装。
https://stackoverflow.com/questions/66887826
复制相似问题