下面展示一些 内联代码片
。
安装pyinstaller一直报错,尝试更新setup.py,安装wheel.更新pip和setuptools仍不能解决(pip install --upgrade setuptools && python -m pip install --upgrade pip),最后通过指定安装版本解决,命令如下:pip install pyinstaller==3.6
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.
Looking in indexes: http://pypi.douban.com/simple/
Collecting pyinstaller
Downloading http://pypi.doubanio.com/packages/9e/ed/fbdad7f5d8f794c901076b814b8e9f5ce31d32c0bc3b63ddd27b61db9530/pyinstaller-4.1.tar.gz (3.5 MB)
|████████████████████████████████| 3.5 MB 1.2 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp3QZlmp
cwd: /tmp/pip-install-6tULGD/pyinstaller
Complete output (19 lines):
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-Dvxz0k/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-Dvxz0k/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-Dvxz0k/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-Dvxz0k/overlay/lib/python2.7/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: /usr/bin/python /usr/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp3QZlmp Check the logs for full command output.
安装成功运行结果显示:
pip install pyinstaller==3.6
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.
Looking in indexes: http://pypi.douban.com/simple/
Collecting pyinstaller==3.6
Downloading http://pypi.doubanio.com/packages/3c/c9/c3f9bc64eb11eee6a824686deba6129884c8cbdf70e750661773b9865ee0/PyInstaller-3.6.tar.gz (3.5 MB)
|████████████████████████████████| 3.5 MB 1.0 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting dis3
Downloading http://pypi.doubanio.com/packages/9c/5c/4a4a2802f10f558018413990a58fd3dd7ed1eb48e6de7266334c2489bad6/dis3-0.1.3-py2-none-any.whl (7.5 kB)
Collecting altgraph
Downloading http://pypi.doubanio.com/packages/cc/ff/88d277ba936d226b0f6dbd6711145f90fcfeed3aa9455c1c2f62c8ffec5b/altgraph-0.17.3-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from pyinstaller==3.6) (44.1.1)
Building wheels for collected packages: pyinstaller
Building wheel for pyinstaller (PEP 517) ... done
Created wheel for pyinstaller: filename=PyInstaller-3.6-py2-none-any.whl size=2926549 sha256=db4abc686b29bb75e304781192633f106192f5e506c6e48df340140d5e5a1769
Stored in directory: /root/.cache/pip/wheels/b1/d1/4a/7173515c941cf2bbed85e26f6230207a297218282cc4d942df
Successfully built pyinstaller
Installing collected packages: dis3, altgraph, pyinstaller
Successfully installed altgraph-0.17.3 dis3-0.1.3 pyinstaller-3.6