如何在 Anaconda (windows) 中升级 OpenCV? [英] How to upgrade OpenCV in Anaconda (windows)?

查看:187
本文介绍了如何在 Anaconda (windows) 中升级 OpenCV?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家.

我的问题是我需要最新版本的 OpenCV (4.3.0) 才能运行代码,但是当我使用以下行检查我的 opencv 版本时:

My problem is that I need the last version of OpenCV (4.3.0) to run a code but when I checked my version of opencv with the line:

print(cv2.__version__)

它说我的cv2版本是3.4.2.所以我进入了我的anaconda环境,我将opencv标记为升级,但它似乎是它可以安装的最后一个版本.所以我在anaconda的cmd.prompt中尝试了一个命令:

it said that my version of cv2 is the 3.4.2. So I went into my anaconda, environment, I marked opencv for upgrade, but it seems it is the last version it can install. So I tried a command in the cmd.prompt of anaconda :

pip install --upgrade opencv-python==4.3.0.36

然后,当我检查opencv"时在我的anaconda环境的安装模块中,看到了两个opencv.一种是opencv"版本 3.4.2,然后,就在下面,有opencv-pyton"版本 4.3.0.但是,当我用print(cv2.version)"再次检查我的 cv2 版本时,它仍然告诉我我的版本是 3.4.2(我也尝试卸载 opencv 3.4.2 看看 anaconda 是否会考虑 opencv-pyton 4.3.0 但不,它给了我一个错误).

And then, when I checked "opencv" in the installed modules of my anaconda environment, I saw two opencv. One is "opencv" version 3.4.2, and then, just below, there is "opencv-pyton" version 4.3.0. BUT, when I checked again my version of cv2 with "print(cv2.version)", it was still telling me that my version is 3.4.2 (I also tried to uninstall the opencv 3.4.2 to see if anaconda would then take into account the opencv-pyton 4.3.0 but no, it gives me an error).

有谁知道如何使用 anaconda 升级我的 opencv 版本?谢谢大家.

Does anyone have an idea how to upgrade my version of opencv with anaconda ? Thanks everyone.

推荐答案

您可能缺少 .condarc 设置中的 conda-forge 频道.

You may be missing the conda-forge channel in your .condarc settings.

试试这个从 conda-forge 安装:

try this to install from conda-forge:

conda install -c conda-forge opencv=4.3.0

这篇关于如何在 Anaconda (windows) 中升级 OpenCV?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆