I used this guide which installs OpenCV in a virtual environment, however I am getting the following error when I try to import the cv2 module:

$ source ~/.profile
$ workon cv
$ python
>>> import cv2
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
ImportError: No module named cv2

As far as I can see OpenCV is installed:

$ pkg-config --modversion opencv
$ 2.4.10

1 Answer 1


Installing openCV does not include the python bindings. You need to install these packages as well:

sudo apt-get install libopencv-dev python-opencv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.