python 安装 cv2报错 conda install PackagesNotFoundError

问题描述:在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

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
相关推荐
2501_909509105 小时前
DAY 31
python
李昊哲小课5 小时前
FastAPI 猫咖预约系统 API
人工智能·python·fastapi
shylyly_6 小时前
C++中的类型转换
开发语言·c++·匿名对象·隐式类型转换·拷贝优化
你驴我6 小时前
WhatsApp 消息撤回与编辑的幂等性设计实践
java·服务器·前端·后端·python
向日的葵0066 小时前
Redis会话机制vsJWT机制深度解析
数据库·redis·python·缓存·系统架构·jwt
祉猷并茂,雯华若锦6 小时前
Win下完美解决Allure报错,生成Web自动化测试报告
android·python·selenium·自动化
北冥you鱼6 小时前
Go 语言新手扫盲:指针 * 和 & 使用场景详解
开发语言·后端·golang
cui_ruicheng6 小时前
Python数据分析(一):数据分析概述与环境搭建
开发语言·python·数据分析
aqi006 小时前
15天学会AI应用开发(十六)LangChain实现对话记忆功能
人工智能·python·大模型·ai编程·ai应用