cv2(OpenCV)下载安装

 cv2对应库是OpenCV,官网下载链接:https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

最好下载对应python版本的,通过pip命令安装可能会出现版本过高或者过低的问题,导致import cv2没问题,但是内部函数无法调用。

如果不想下载到本地,也可以通过命令安装:

pip install opencv-python==4.5.5 --user -i https://pypi.tuna.tsinghua.edu.cn/simple

上述对应python版本是3.7~3.11。

另附最简单的安装方法:

pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/
pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple/ 

附 opencv-contrib-python 的whl下载地址:

Links for opencv-contrib-python

猜你喜欢

转载自blog.csdn.net/baidu_41774120/article/details/130133581