代码里cv2标红了,发现需要安装opencv,于是开始了。。。。
一开始查到说安装cv2模块,不能直接用命令pip install cv2安装,要用命令如下:
pip install opencv-python
使用命令后报错如下:
ERROR: Exception:
Traceback (most recent call last):
File “/Users/xxx/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py”, line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: ‘opencv-python’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Users/xxx/opt/anaconda3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py”, line 438, in _error_catcher
发现是网速太慢,换了镜像网址,命令如下:
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
更换镜像网址后出现最致命的错误:
ERROR: Could not fi