我想在運行apache的Amazon EC2 Micro實例上創建的python web應用程序上使用OpenCV。在Amazon Linux(apache)上安裝OpenCV/python?
我已經配置好了所有配置和工作,除了OpenCV沒有安裝。這是我從Apache錯誤日誌中獲得的輸出。
[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
這裏是我試過:
我已經安裝了點子和嘗試運行pip install pyopencv
這並不工作,給我的錯誤。 How to install OpenCV on Amazon Linux?
這:http://techieroop.com/install-opencv-in-centos/
即使安裝後,cv2.so文件無處可
我也試過手動按照此安裝它被發現。我試圖用sudo find/-name "cv2.so"
搜索它,但沒有出現。
我這樣做,不過,已經安裝了以下.so
文件:
/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
而且,在運行cmake的命令時,這是我得到的輸出:
-- 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
任何幫助讚賞。
你複製cv2.so到站點包你的Python分佈下(如/usr/local/lib/python2.7/site-packages) ? – bblincoe
@bblincoe其中是cv2.so文件?在我的/usr/local/lib/python2.6/中,我沒有任何cv2.so文件,但是我有用於點的文件。在我的/usr/local/lib/python2.7/我只有一個自述文件 –
看看這個線程:http://stackoverflow.com/questions/15790501/why-cv2-so-missing-after-opencv-安裝 – bblincoe