繁体   English   中英

在python3 ubuntu 14.04下安装opencv-python

[英]Install opencv-python under python3 ubuntu 14.04

我想在 Ubunto 14.04 的 python 3 下使用 opencv。 我计划使用 PyCharm IDE 来开发我的程序。

在我选择的 PyCharm 中,我设置:

File/Settings/Project:HelloWorld/Project Interpreter/3.4.3(/usr/bin/python3.4)

Python 3.4.3 是 Ubunto 14.04 中 Python 的默认版本。

然后我尝试添加opencv-python包:

File/Settings/Project:HelloWorld/Project Interpreter/+ (添加包的地方)

系统给了我这个错误:

 Executed command:

 pip install opencv-python 


 Try to run this command from the system terminal. Make sure that you   
 use the correct version of 'pip' installed for your Python interpreter located at '/usr/bin/python3.4'.

 DEPRECATION: --no-install, --no-download, --build, and --no-clean are   deprecated.  See https://github.com/pypa/pip/issues/906.
 Downloading/unpacking opencv-python
 Could not find any downloads that satisfy the requirement opencv-python
 Cleaning up...
 No distributions at all found for opencv-python
 Storing debug log for failure in /root/.pip/pip.log

当我从终端运行命令时,错误是一样的。 我相信这个问题与在 python3 下安装 opencv 有关,但我不确定我是否可以修复它。 请让我知道你的意见。

谢谢

解决方法是更新您的 pip 并重试。 这对我有用。

所以,首先:

pip install --upgrade pip

在那之后:

pip install opencv-python

首先,你不应该使用 install opencv-python,这不是官方的 opencv 包。 请参阅: **已解决**在 Ubuntu 16 上安装 openCV 时如何在 cmake 中包含 libgtk2.0-dev 和 pkg-config

如果你想安装 opencv,你可以关注这个对我有用的网站 您可能需要修改某些部分(主要是版本号和 cmake 过程中的路径)。

我在 Windows 中也遇到了类似的问题,pip upgrade 对我有用,

pip install --upgrade pip

并使用以下命令安装,

pip install opencv-python

据我从查询 pip (使用pip search opencv )可以看出,没有名为opencv-python包,我认为您正在寻找的是pyopencv

这个问题似乎几乎相同

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM