麻了
C:\Users\admintor>pip install cv2
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
WARNING: You are using pip version 21.2.4; however, version 22.2 is available.
You should consider upgrading via the 'C:\Program Files\Python310\python.exe -m pip install --upgrade pip' command.
C:\Users\admintor>pip install --upgrade cv2
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
WARNING: You are using pip version 21.2.4; however, version 22.2 is available.
You should consider upgrading via the 'C:\Program Files\Python310\python.exe -m pip install --upgrade pip' command.
C:\Users\admintor>pip uninstall cv2
WARNING: Skipping cv2 as it is not installed.
pycharm上能被调用,输出cv2也没报错
库里没有这个包
但输入cv2.imread()他不会扩展(就是输入im会展示imread这个函数)
不懂啥情况
重点是在pycharm上调用cv2没有代码提示,输入代码标黄
升级一下你的cv2库
或者卸载重新装一下
是不是先运行下这个命令,升级下pip 然后再去安装cv2
#在cmd中输入
C:\Program Files\Python310\python.exe -m pip install --upgrade pip
#等待升级结束时再输入
pip install cv2
#等待读条结束后即可
1.pip install opencv-python
2.pip install opencv-contrib-python
不应该是这么安装吗