没有名为 cv2 的模块错误


>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>> 

我从这里在我的根目录中安装了 openCV。我无法在我的项目中使用它。

有什么建议吗?

从此链接下载最新软件包http://opencv.org/downloads.html

尝试从此链接构建和安装 opencv。http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/

啊!经过所有的挣扎,我终于成功了。这是从头开始的重新开始:第 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/

相关内容

  • 没有找到相关文章

最新更新