OpenCV with Python (cv or cv2)

Laura Creighton lac at openend.se
Tue May 26 10:21:11 EDT 2015


In a message of Tue, 26 May 2015 10:24:30 -0300, Markos writes:
>Hi,
>
>I want to use OpenCV with Python.
>
>I installed version 2.4.9 
>(http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/) 
>in debian Squeeze running Python 2.6.6. Using the tutorial: 
>http://indranilsinharoy.com/2012/11/01/installing-opencv-on-linux/
>
>(I tried to install versions 2.4.11 and 2.4.10 (in Squeeze with python 
>2.2.6) but I couldn't.)

You mean python 2.6.6, right?
and this package: https://packages.debian.org/source/squeeze/opencv
which is 2.1.0-3 is too old for you?

What do you mean that you
tried to install versions 2.4.11 and 2.4.10 but couldn't?  What
error messages did you get?

>I lost some time trying to load the module cv2:
>
>> >> Import cv2.cv the cv

s/the/as/ ?
 
>Traceback (most recent call last):
>File "<stdin>", line 1, in <module >>
>ImportError: No module named cv2.cv
>
>After a while I realized I could use the cv module. (import cv)
>
>But still I do not understand the differences between the modules cv and 
>cv2.
>
>Do you suggest any good tutorial about the differences between cv and cv2?
>
>I will have to make many changes in python programs using cv to reuse 
>the code later with cv2?
>
>Thanks,
>Markos
>-- 
>https://mail.python.org/mailman/listinfo/python-list

post the output you got from cmake

It will probably complain that it is missing some headers, so couldn't
make libcv2.so

If you haven't installed python-dev (not just python) and numpy I
guarantee it will not find needed headers; if you have but it is
still not being made we will have to look harder at what is going wrong.

If it made a libcv.so for you, did it put it in a place you can see
with your PYTHONPATH?

Laura





More information about the Python-list mailing list