ERROR:Could not find a version that satisfies the requirement opencv-python解决办法
·
一、问题描述
遇到报错
ImportError: No module named 'cv2'
第一反应用pip install cv2报错了,才反应过来根本没有cv2库,正确命令应该是pip install opencv-python。奇怪的是,竟然也报错了。
报错信息:
ERROR:Could not find a version that satisfies the requirement opencv-python (from versions:None)
二、解决办法
1.先安装清华镜像
pip install https://pypi.tuna.tsinghua.edu.cn/simple
可能会报错,忽略即可。
2.接着运行下面的命令
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
如遇到权限问题,按照提示加入–user。
pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn opencv-python
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)