我试图在葡萄酒中安装Python包,但它一直给我内部语法错误。当我试图安装pyinstaller时,它给了我以下内容:
C:\>pip 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: 'c:\Python27\python.exe' 'c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\jackpy\temp\tmpo_ofkx'
cwd: c:\users\jackpy\temp\pip-install-tjtlkl\pyinstaller
Complete output (19 lines):
Traceback (most recent call last):
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "c:\users\jackpy\temp\pip-build-env-wvrvge\overlay\Lib\site-packages\setuptools\build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 63
file=sys.stderr)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\Python27\python.exe' 'c:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'c:\users\jackpy\temp\tmpo_ofkx' Check the logs for full command output.我尝试过使用get-pip.py卸载和重新安装,并且始终是相同的错误。
我正在使用Python2.7.18和Wine4.0。有人能告诉我怎么解决这个问题吗?
发布于 2022-03-21 10:47:43
如果绝对需要使用Python2.7,那么使用上一个受支持的版本仍然有效。请尝试
pip install pyinstaller==3.6发布于 2022-03-20 19:42:41
据我从pyinstaller网站上可以看到,他们已经放弃了版本4.0对python2.7的支持,您正在尝试安装4.1.0版本(https://pyinstaller.readthedocs.io/en/stable/)。
Finally, this version drops support for Python 2.7, which is end-of-life since January 2020.. The minimum required version is now Python 3.6.
而且,我在PyPI上没有看到任何其他可用的版本,所以您唯一的选择是将您的python升级到至少3.6版本。
祝你好运!
发布于 2022-03-20 20:11:08
,
https://stackoverflow.com/questions/71550039
复制相似问题