[在python3 ubuntu 14.04下安装opencv-python

问题描述 投票:5回答:4

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

我选择的PyCharm内部设置:

文件/设置/项目:HelloWorld /项目解释器/3.4.3(/usr/bin/python3.4)

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

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

文件/设置/项目:HelloWorld /项目解释器/ +(添加包的位置)

并且系统给我这个错误:

 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有关,但是我不确定是否可以解决它。请让我知道您的意见。

谢谢

python opencv
4个回答
9
投票

解决方法是更新您的点,然后重试。这对我有用。

所以,首先:

pip install --upgrade pip

此后:

pip install opencv-python


1
投票

首先,您不应该使用install opencv-python,这不是官方的opencv软件包。请参阅:**SOLVED** How to include libgtk2.0-dev and pkg-config in cmake when installing openCV on Ubuntu 16

如果您要安装opencv,可以按照此website进行操作,该方法对我有用。您可能需要修改某些部分(主要是版本号和cmake过程中的路径)。


1
投票

我在Windows中也遇到了类似的问题,pip升级为我工作,

pip install --upgrade pip

并使用以下命令安装,

pip install opencv-python

0
投票

据我从查询点(使用pip search opencv所看到的,没有名为opencv-python的程序包,我认为您正在寻找的是pyopencv

this issue appears to be almost identical

© www.soinside.com 2019 - 2024. All rights reserved.