Cannot find module cv2 when using OpenCV

I have installed OpenCV on the Occidentalis operating system (a variant of Raspbian) on a Raspberry Pi, using this script by jayrambhia. It installed version 2.4.5.

When I try import cv2 in a Python program, I get the following message:

pi@raspberrypi~$ python cam.py
Traceback (most recent call last)
File "cam.py", line 1, in 
    import cv2
ImportError: No module named cv2

The file cv2.so is stored in /usr/local/lib/python2.7/site-packages/...

There are also folders in /usr/local/lib called python3.2 and python2.6, in case that is relevant.

How can I fix the problem? Is this caused by a path misconfiguration?

← Назад к списку