(其他系统环境配置已完成)
提示 ModuleNotFoundError: No module named 'cv2'
输入 pip install cv2
提示 ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
但opencv-python已安装:
输入 pip install opencv-python
提示 Requirement already satisfied: opencv-python in d:\python38\lib\site-packages (4.3.0.36)
Requirement already satisfied: numpy>=1.17.3 in d:\python38\lib\site-packages (from opencv-python) (1.19.1)
请问这种情况如何解决?
第一个是你命令错了骚年
pip install opencv-python
第二个错误是cv2和numpy有关联关系,需要numpy版本大于等于1.17.3
我电脑上是这2个版本
你可以先把你电脑上的模块卸载再安装
pip uninstall opencv-python
pip uninstall numpy
pip install opencv-python==4.1.0.25
pip install numpy==1.18.1