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
相关推荐
Wang's Blog44 分钟前
Java 项目实战: 交友项目 - FastDFS:入门案例
java·开发语言·交友
apcipot_rain2 小时前
C++转Java日记(03)
java·开发语言·c++
布莱克6052 小时前
C++ 中 map 的 insert 与 emplace:key 已存在时会覆盖吗?
开发语言·数据结构·c++·算法·map
xys_6782 小时前
深挖C++:类和对象(中)
开发语言·c++
灿飞屋2 小时前
Rust 编程其实很简单
开发语言·rust
MOONICK4 小时前
QT元数据
开发语言·qt
卷无止境4 小时前
RAGFlow 项目全景报告:从文档解析引擎到 Agent 原生数据库
后端·python
D e re k ZH5 小时前
C++ 系统学习手记:从语法细节到工程实践
开发语言·数据结构·c++·算法
灿飞屋5 小时前
Kotlin与Java虚拟机三:控制流
android·java·开发语言·后端·python·kotlin·安卓
benchmark_cc5 小时前
单只股票五档盘口接入个人研究仓库:QuantDash 读取、校验与易错点
python·数据分析·pandas·量化交易·股票数据·quantdash