CentOS7-x86_64 Python2.7 安装 CPU 版本失败,安装依赖 opencv-python 时报错
Created by: Cxywzx
CentOS7-x86_64 Python2.7 安装 CPU 版本失败,安装依赖 opencv-python 时报错。
# 环境信息:
****************************************
Paddle version: None
Paddle With CUDA: None
OS: CentOS Linux 7.8.2003
Python version: 2.7.18
CUDA version: None
cuDNN version: None.None.None
Nvidia driver version: None
****************************************
错误信息如下:
# 安装命令
# python -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple
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
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting paddlepaddle
Using cached https://mirror.baidu.com/pypi/packages/0e/01/768ed8fb7d62218fd6b149a66a8193891d4d7cd8aded2d28f7566b31f10e/paddlepaddle-1.8.4-cp27-cp27m-manylinux1_x86_64.whl (111.2 MB)
Collecting Pillow
Using cached https://mirror.baidu.com/pypi/packages/40/ee/4059677bc68660f573af0d40783baa94197913c26f86b9e73a75e9c9b3f6/Pillow-6.2.2-cp27-cp27m-manylinux1_x86_64.whl (2.1 MB)
Collecting opencv-python
Using cached https://mirror.baidu.com/pypi/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpnmCTYN
cwd: /tmp/pip-install-FYqklA/opencv-python
Complete output (22 lines):
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/usr/local/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/local/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-JKEvdm/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-JKEvdm/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-JKEvdm/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-JKEvdm/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 448, in <module>
main()
File "setup.py", line 99, in main
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
File "/usr/local/lib/python2.7/re.py", line 210, in escape
s = list(pattern)
TypeError: 'NoneType' object is not iterable
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpnmCTYN Check the logs for full command output.