|
python2 pip安装opencv-python报错:TypeError: 'NoneType' object is not iterable
ERROR: Command errored out with exit status 1:
command: /home/jiang/miniconda3/envs/py2_caffe_source/bin/python2 /home/jiang/miniconda3/envs/py2_caffe_source/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpPlDeDX
cwd: /tmp/pip-install-9ydIbJ/opencv-python
Complete output (22 lines):
Traceback (most recent call last):
TypeError: 'NoneType' object is not iterable
----------------------------------------
ERROR: Command errored out with exit status 1: /home/jiang/miniconda3/envs/py2_caffe_source/bin/python /home/jiang/miniconda3/envs/py2_caffe_source/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp4S4dJK Check the logs for full command output.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
Downloading https://pypi.tuna.tsinghua.edu.c ... hon-4.3.0.38.tar.gz (88.0 MB)
pip install opencv-python==4.2
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/de ... s/#python-2-support
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement opencv-python==4.2 (from versions: 3.1.0.0, 3.1.0.1, 3.1.0.2, 3.1.0.3, 3.1.0.4, 3.1.0.5, 3.2.0.6, 3.2.0.7, 3.2.0.8, 3.3.0.9, 3.3.0.10, 3.3.1.11, 3.4.0.12, 3.4.0.14, 3.4.1.15, 3.4.2.16, 3.4.2.17, 3.4.3.18, 3.4.4.19, 3.4.5.20, 3.4.6.27, 3.4.7.28, 3.4.8.29, 3.4.9.31, 3.4.10.37, 4.0.0.21, 4.0.1.23, 4.0.1.24, 4.1.0.25, 4.1.1.26, 4.1.2.30, 4.2.0.32, 4.3.0.38)
ERROR: No matching distribution found for opencv-python==4.2
发现:pip install opencv-python 安装是最新版本 opencv-python-4.3.0.38.tar.gz是这个文件
后来降低版本 pip install opencv-python==4.2.0.32 就可以了 (要下载*.whl文件才对)
Downloading https://pypi.tuna.tsinghua.edu.c ... nylinux1_x86_64.whl (28.2 MB)
|████████████████████████████████| 28.2 MB 730 kB/s
Requirement already satisfied: numpy>=1.11.1 in /home/jiang/miniconda3/envs/py2_caffe_source/lib/python2.7/site-packages (from opencv-python==4.2.0.32) (1.16.6)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.2.0.32
|
|