5

I want to use opencv under python 3 in Ubunto 14.04. I plan to use the PyCharm IDE to develop my program.

Inside PyCharm I choose, I set:

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

Python 3.4.3 is the default version of python in Ubunto 14.04.

Then I try to add opencv-python package:

File/Settings/Project:HelloWorld/Project Interpreter/+ (where you add the package)

and the system gives me this error:

 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

the error is the same when I run the command from terminal. I believe the problem is related to installing opencv under python3 but I am not sure I know if I can fix it. Please let me know your opinion.

Thanks

4 Answers 4

9

The fix is to update your pip and try again. This worked for me.

So, first:

pip install --upgrade pip

after that:

pip install opencv-python

Sign up to request clarification or add additional context in comments.

Comments

1

First, you should not use install opencv-python, this is not the official opencv package. Please, see: **SOLVED** How to include libgtk2.0-dev and pkg-config in cmake when installing openCV on Ubuntu 16

If you want to install opencv, you can follow this website, that worked for me. You might need to apapt some parts (mainly version numbers, and paths during the cmake process).

Comments

1

I also faced similar issue in the windows and pip upgrade worked for me,

pip install --upgrade pip

and install using below command,

pip install opencv-python

Comments

0

As far as I can see from querying pip (using pip search opencv) there is no package called opencv-python I think the one you're looking for is pyopencv.

this issue appears to be almost identical

3 Comments

I could solve the problem following this: cyaninfinite.com/tutorials/…. No, I have another problem (seems some libraries are missing). Here is the error: 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,.
(I don't mean this to sound like I'm being sarcastic) Have you tried installing the missing libraries?
I followed this instruction: stackoverflow.com/questions/28776053/opencv-gtk2-x-error and it worked. Dilanm, yes I tried but going through the make and install phase, is not an easy task always. My problem is now solved

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.