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开发者_StackOverflow. 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.
You'll need to rebuild OpenCV against the new Python you've installed.
python2.6 setup.py install
精彩评论