1 | initial version |
I had similar issues trying to follow the patchwork of install guides from various years and versions. Installing opencv from source as per the directions here was what finally fixed most of the problems for me (using Linux Mint 14). Try installing from source as described in those directions, then see whether you're able to run any of the example programs that come with it.
If you have multiple versions of Python on your system, make sure that the first line of your .py file specifies which to use -- for example, #!/usr/bin/env python2.7
(see here for some more information about the #! line)
Also, you probably want to be importing cv2
rather than opencv
. I'm not sure of the exact history behind the name change, but all of the python code I've seen working with the latest version of opencv (and the example files which are provided when you install from source) uses cv2.