0
点赞
收藏
分享

微信扫一扫

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)


安装PIL提示:

Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

如下图所示:

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_环境配置

3、错误原因:后来找了很多方法,发现我的电脑是64位的,而官网只提供32位的,就是自己去官网下载的其他PIL,

也是32位的。

4、解决方法:找一个非官方的64位大家通用的PIL安装

(1)打开网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/

(2)搜索PIL(ctrl+F),找到下面的图片所示,如果你的python是2.7版本就下载cp27的,3.5就下载cp35

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_官网_02

(3)还要先安装wheel。选择相应版本下载后,打开cmd(win+r),你要先安装pip,具体pip安装百度一下怎么安装,

输入pip install wheel 后如图所示

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_python_03

(4)wheel安装好后,找到我们下载好的Pillow‑6.2.1‑cp37‑cp37m‑win_amd64.whl(这是我的版本)

由于我把它放在桌面,所以我打开cmd后,找到存放该文件的桌面,然后pip 安装就成功了

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_官网_04

5、成功后,就可以使用了

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_官网_05

6、安装的第三方模块位置:pycharm->File->Settings->Project Interpreter

Python3安装包,ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)_python_06

安装CV2提示:

ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2

在python中安装cv2库是提示不能找到满足需要的版本,我的环境配置是:pycharm+anaconda3,对应的python版本是python3.7,

首先打开终端,直接输入如下命令安装时发现也会提示出错

pip install cv2

最后利用下面的命令安装就成功了,然后你就可以愉快的玩耍了

pip install opencv-python
或者
pip3 install opencv-python



举报

相关推荐

0 条评论