如何在python 3.8中安装opencv-python [英] How to install opencv-python in python 3.8

查看:5186
本文介绍了如何在python 3.8中安装opencv-python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在pycharm中安装opencv-python时遇到问题. 打开pycharm后,我单击设置,然后单击项目解释器,然后单击"+"并搜索正确的模块,我开始安装,但是失败,显示

I'm having problem during the installation of opencv-python in pycharm. After opening pycharm I click on settings and then project interpreter, I click on '+' and search for the correct module, I started the installation but it fails with

Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python

此外,我尝试通过控制台进行安装,但出现相同的错误. 我还更新到了最新的pip版本,该如何解决?

Additionally I tried installing it through console but I get the same error. I also have updated to the last pip version, how can I solve this?

推荐答案

编辑/更新:您现在可以通过pip安装,对python 3.8的支持已经添加

EDIT / UPDATE: You can now install through pip, support was added to python 3.8

OpenCV尚未(正式)与python 3.8兼容.这个版本的python是相当新的,还不能安装很多pip包.您可以在 OpenCV的PyPi页面

OpenCV is not yet (officially) compatible with python 3.8. this version of python is quite new and lots of pip packages can't be installed on it (yet). You can verify that at the bottom of the PyPi page for OpenCV

三种可能的解决方案:

  1. 降级到python 3.7.5并像往常一样通过pip安装软件包,并等待正式支持的版本,然后再尝试使用python 3.8
  2. 尝试自己从源文件构建OpenCV.这可能需要大量的技术知识,并且可能在没有对来源进行任何更改的情况下最终最终失败.如果您对该解决方案感兴趣,请在Windows的此处启动. 在此(对于Linux)
  3. 此处有可用的预制轮子3.8,但这是非官方的(但此处的来源很可信)-这可能是设置的最简单选择
  1. Downgrade to python 3.7.5 and install the package through pip as you normally would, and wait for an officially supported version before trying again with python 3.8
  2. Try building OpenCV from source files yourself. This might require quite a bit of technical knowledge and might ultimately fail anyway without some changes to the source. If you're interested in that solution, start here for windows or here for linux
  3. There is a pre-built wheel available here that works with python 3.8, but it is unofficial (but the source here is quite credible) - this is probably the easiest choice to set up

此外,您可以在此GitHub问题中跟踪何时支持python 3.8. /a>

Also, you can track when support will come to python 3.8 in this GitHub issue

这篇关于如何在python 3.8中安装opencv-python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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