【问题标题】:Install opencv-python under python3 ubuntu 14.04python3 ubuntu 14.04下安装opencv-python
【发布时间】:2016-09-19 10:01:38
【问题描述】:

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

在我选择的 PyCharm 内部,我设置:

文件/设置/项目: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 有关,但我不确定我是否可以修复它。请让我知道你的意见。

谢谢

【问题讨论】:

    标签: python opencv


    【解决方案1】:

    我在 windows 中也遇到了类似的问题,pip 升级对我有用,

    pip install --upgrade pip
    

    并使用以下命令安装,

    pip install opencv-python
    

    【讨论】:

      【解决方案2】:

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

      所以,首先:

      pip install --upgrade pip

      之后:

      pip install opencv-python

      【讨论】:

        【解决方案3】:

        首先,你不应该使用 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 过程中的路径)。

        【讨论】:

          【解决方案4】:

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

          this issue appears to be almost identical

          【讨论】:

          • 我可以解决以下问题:cyaninfinite.com/tutorials/…。不,我还有另一个问题(似乎缺少一些库)。这是错误:OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config,.
          • (我并不是说这听起来像是在讽刺)您是否尝试过安装缺少的库?
          • 我按照以下说明进行操作:stackoverflow.com/questions/28776053/opencv-gtk2-x-error,它成功了。 Dilanm,是的,我试过了,但是经历makeinstall 阶段,总是不是一件容易的事。我的问题现在解决了
          猜你喜欢
          • 1970-01-01
          • 2015-12-21
          • 1970-01-01
          • 2016-09-08
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多