>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>>
我在根目录中从here安装了openCV。我无法在我的项目中使用它。
有什么建议吗?
答案 0 :(得分:0)
从此链接下载最新的软件包 http://opencv.org/downloads.html
尝试从此链接构建和安装opencv。 http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/
答案 1 :(得分:0)
啊!经过一切努力,我终于成功了。 这是从一开始就重新开始的: 第1步:从系统中删除以前安装的openCV
sudo apt-get autoremove opencv-doc opencv-data libopencv-dev libopencv2.4-java libopencv2.4-jni python-opencv libopencv-core2.4 libopencv-gpu2.4 libopencv-ts2.4 libopencv-photo2.4 libopencv-contrib2.4 libopencv-imgproc2.4 libopencv-superres2.4 libopencv-stitching2.4 libopencv-ocl2.4 libopencv-legacy2.4 libopencv-ml2.4 libopencv-video2.4 libopencv-videostab2.4 libopencv-objdetect2.4 libopencv-calib3d2.4
第2步:按照本指南一步一步:http://foxrow.com/installing-opencv-in-a-virtualenv/