2016-09-19 76 views
2

我想在ubunto 14.04的python 3下使用opencv。我打算使用PyCharm IDE来开发我的程序。在python3下安装opencv-python ubunto 14.04

里面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有关,但我不知道我是否可以修复它。请让我知道你的意见。

感谢

回答

0

据我可以(用pip search opencv)查询PIP看有没有包叫做opencv-python我想你要找的人是pyopencv

this issue appears to be almost identical

+0

我可以解决以下问题:http://cyaninfinite.com/tutorials/installing-opencv-in-ubuntu-for-python-3/。不,我有另一个问题(似乎有些图书馆不见了)。这里是错误:'OpenCV Error:Unspecified error(该函数没有实现,用Windows,GTK + 2.x或Carbon支持来重建库如果你在Ubuntu或者Debian上,安装libgtk2.0-dev和pkg-config '。 –

+0

(我不认为这听起来像我讽刺)你有没有尝试安装缺少的库? – Dillanm

+1

我遵循这个指令:http://stackoverflow.com/questions/28776053/opencv-gtk2-x-error它工作。 Dilanm,是的,我试过了,但是经历了“make”和“install”阶段,总是不是一件容易的事情。我的问题现在已经解决了 –

4

解决的办法是更新您的点子,然后重试。这对我有效。

所以,首先:

pip install --upgrade pip

后:

pip install opencv-python

0

我也面临类似的问题,在Windows和PIP升级工作对我来说,

pip install --upgrade pip 

并安装使用g下面的命令,

pip install opencv-python