python 安装 cv2报错 conda install PackagesNotFoundError
2024-01-10 12:24:21
问题描述:在vscode中利用conda 安装 cv2报错
报错如下:Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- cv2
Current channels:
解决
方案一
conda config --add channels conda-forge
conda config --add channels anaconda.org
- 结果:报错如下
HTTP 404 NOT FOUND for channel anaconda.org https://conda.anaconda.org/anaconda.org
The channel is not accessible or is invalid.
方案二
conda config --remove-key channels
pip install opencv-python
- 结果 :
Successfully installed opencv-python-4.9.0.80
- 总结:安装cv2 时使用如下命令
pip install opencv-python
- 使用时:import cv2 as cv
文章来源:https://blog.csdn.net/Webgiser_yy/article/details/135496137
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!