I am trying to use OpenCV on a python web application I created on an Amazon EC2 Micro instance running apache.
I've got everything configured and working, except OpenCV isn't installing. This is the output I got from the Apache Error Log.
[Thu Aug 04 18:31:54 2016] [error] [client 72.219.147.5] import cv2
[Thu Aug 04 18:31:54 2016] [error] [client 72.219.147.5] ImportError: No module named cv2
Here is what I've tried:
I've installed pip and tried running pip install pyopencv
That doesn't work and gives me errors.
I've also tried manually installing it by following this: How to install OpenCV on Amazon Linux?
and this: http://techieroop.com/install-opencv-in-centos/
Even after installation, the cv2.so file is nowhere to be be found. I tried to search for it using sudo find / -name "cv2.so"
but nothing came up.
I do, however, have the following .so
files installed:
/usr/local/lib/libopencv_photo.so
/usr/local/lib/libopencv_stitching.so
/usr/local/lib/libopencv_flann.so
/usr/local/lib/libopencv_imgcodecs.so
/usr/local/lib/libopencv_videostab.so
/usr/local/lib/libopencv_ml.so
/usr/local/lib/libopencv_objdetect.so
/usr/local/lib/libopencv_imgproc.so
/usr/local/lib/libopencv_superres.so
/usr/local/lib/libopencv_core.so
/usr/local/lib/libopencv_video.so
/usr/local/lib/libopencv_highgui.so
/usr/local/lib/libopencv_features2d.so
/usr/local/lib/libopencv_shape.so
/usr/local/lib/libopencv_videoio.so
/usr/local/lib/libopencv_calib3d.so
Also, when running the cmake command, this is the output I'm getting:
-- Python 2:
-- Interpreter: /usr/bin/python2.7 (ver 2.7.10)
-- Libraries: NO
-- numpy: NO (Python wrappers can not be generated)
-- packages path: lib/python2.7/dist-packages
Any help is appreciated.