the error is

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

(1)doesnt work

The easiest way to install OpenCV on Windows is to simply copy the cv2.pyd file into Python's site-packages directory (e.g. C:\python27\Lib\site-packages).

To get the cv2.pyd file, download and extract the latest version of the OpenCV installation executable from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ and browse the extracted folder to find the file in the relevant build directory (e.g. build\python\x86\2.7).

(2)work method:

Installing openCV does not include the python bindings. You need to install these packages as well:

sudo apt-get install libopencv-dev python-opencv


Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐