0

I'm having some issues. I've installed OpenCV 2.3 on an ec2 ubuntu instance - and compiled with the necessaries for python integration. I realised that python was behind so upgraded that to 2.6 afterwards.

All should be good. However, running a basic .py script and calling OpenCV in isn't working. Forgive me if this is a basic error, I'm new to OpenCV.

SCRIPT IS:-

import cv
cv.SaveImage("foo.jpg", cv.LoadImage("foo.png"))

WHEN RUN IT RESPONDS:-

Traceback (most recent call last):
  File "tester.py", line 1, in <module>
    import opencv
ImportError: No module named opencv

Am I doing something silly here. I've tried looking at this idea that some have harped on about, of moving stuff to different to different dirs - but not found the files the talk of, specifically finding opencv.so and moving it to python dirs.

Any advice gratefully received.

1 Answer 1

2

You'll need to rebuild OpenCV against the new Python you've installed.

python2.6 setup.py install
Sign up to request clarification or add additional context in comments.

1 Comment

Is there a way of doing without downloading tars etc. etc. I upgraded via apt-get. Apologies if this is a stupid question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.