原文链接:http://www.juzicode.com/archives/6450
错误提示:
指定4.5.0版本安装OpenCV-Python提示无该安装包,ERROR: No matching distribution found for opencv-python==4.5.0
pip install opencv-python==4.5.0
==========运行结果:
CD:\Python\vPython38-image\Scripts>pip install opencv-python==4.5.0
Collecting opencv-python==4.5.0
ERROR: Could not find a version that satisfies the requirement opencv-python==4.5.0 (from versions: 3.4.8.29, 3.4.9.31, 3.4.9.33, 3.4.10.35, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.14.51, 3.4.14.53, 4.1.2.30, 4.2.0.32, 4.2.0.34, 4.3.0.36, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.2.52, 4.5.2.54)
ERROR: No matching distribution found for opencv-python==4.5.0
WARNING: You are using pip version 19.2.3, however version 21.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
错误原因:
1、从错误提示看,没有4.5.0版本,可以选择相近的版本安装,比如安装4.5.2.52
解决方法:
1、指定4.5.2.52版本安装
pip install opencv-python==4.5.2.52
==========运行结果:
Installing collected packages: opencv-python
Successfully installed opencv-python-4.5.2.52
扩展内容:
如果本文还没有完全解决你的疑惑,你也可以在微信公众号“桔子code”后台给我留言,欢迎一起探讨交流。