从预建的二进制文件安装OpenCV
Below Python packages are to be downloaded and installed to their default locations. Python-2.7.x. Numpy. Matplotlib (Matplotlib is optional, but recommended since we use it a lot in our tutorials). Install all packages into their default locations. Python will be installed to C:/Python27/. After installation, open Python IDLE. Enter import numpy and make sure Numpy is working fine. Download latest OpenCV release from sourceforge site and double-click to extract it. Goto opencv/build/python/2.7 folder. Copy cv2.pyd to C:/Python27/lib/site-packages. Open Python IDLE and type following codes in Python terminal.
导入cv2 打印cv2。版本如果结果打印出来没有任何错误,恭喜!!!您已经安装了OpenCV-Python 成功。
import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <modul
ImportError: No module named cv2
我正在尝试使用tesseract和opencv并且运行了2天。我已经卸载了python 3并且几乎所有与之相关的内容都是因为大多数模块在python 2.7中运行。但是在恢复python 2.7之后仍然重新安装所有内容它在我的智慧结束时显示没有名为cv2.Am的模块。请帮助我