Installing OpenCV from prebuilt binaries
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.
import cv2 print cv2.version If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python successfully.
import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <modul
ImportError: No module named cv2
在过去的两天里,我一直在试着让tesseract和opencv运行起来。我已经卸载了Python3和几乎所有与之相关的模块,因为大多数模块都是在Python2.7中运行的。在恢复Python2.7并重新安装所有模块之后,仍然没有显示任何名为cv2的模块。我真是不知所措。请帮助我
目前没有回答
相关问题 更多 >
编程相关推荐