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
相关推荐
踏着七彩祥云的小丑21 小时前
pytest——Mark标记
开发语言·python·pytest
Dream of maid1 天前
Python12(网络编程)
开发语言·网络·php
W23035765731 天前
经典算法:最长上升子序列(LIS)深度解析 C++ 实现
开发语言·c++·算法
Y4090011 天前
【多线程】线程安全(1)
java·开发语言·jvm
不爱吃炸鸡柳1 天前
Python入门第一课:零基础认识Python + 环境搭建 + 基础语法精讲
开发语言·python
minji...1 天前
Linux 线程同步与互斥(三) 生产者消费者模型,基于阻塞队列的生产者消费者模型的代码实现
linux·运维·服务器·开发语言·网络·c++·算法
Dxy12393102161 天前
Python基于BERT的上下文纠错详解
开发语言·python·bert
SiYuanFeng1 天前
Colab复现 NanoChat:从 Tokenizer(CPU)、Base Train(CPU) 到 SFT(GPU) 的完整踩坑实录
python·colab
wjs20241 天前
JavaScript 语句
开发语言