东方耀AI技术分享

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 9598|回复: 0
打印 上一主题 下一主题

[课堂笔记] python2 pip安装opencv-python报错:TypeError: 'NoneType' object is not it...

[复制链接]

1365

主题

1856

帖子

1万

积分

管理员

Rank: 10Rank: 10Rank: 10

积分
14432
QQ
跳转到指定楼层
楼主
发表于 2020-9-4 14:52:49 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
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


opencv02.png (128.14 KB, 下载次数: 125)

opencv02.png

opencv01.png (171.94 KB, 下载次数: 125)

opencv01.png
让天下人人学会人工智能!人工智能的前景一片大好!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|人工智能工程师的摇篮 ( 湘ICP备2020019608号-1 )

GMT+8, 2024-4-26 06:14 , Processed in 0.189922 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表