Ask Your Question
0

OpenCV Python install question on Ubuntu lucid

asked 2013-03-28 14:44:26 -0600

I am trying to install opencv on to my system, however, I fear I may have absolutely botched the install. I made the mistake of following more than 1 website with instructions and downloaded unnecessary things or downloaded incorrect things. Also, the default python I have on my system is python 2.6, and I installed python2.7 but it could only be run using the command python2.7. In addition, I am able to import opencv in python2.6 but it doesn't do anything since any method I try to use just gives an error. Is there any way to wipe all this and start from scratch? Is there a defined method of installing opencv python in ubuntu? I realize I have not given much information to go on, but this is because I downloaded so many things with the most obscure names. I can dig up the history install log if anyone wishes to see it.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-02 21:07:00 -0600

edunham gravatar image

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-28 14:44:26 -0600

Seen: 522 times

Last updated: May 02 '13