【问题标题】:Integrating opencv with python将opencv与python集成
【发布时间】:2016-04-19 09:05:59
【问题描述】:
我在Windows 10 (64-bit) 中使用Python 2.7 和Pycharm IDE (32-bit)。我已经安装了numpy 1.8 并将cv2.pyd 复制到C:\Python27\Lib\site-packages。
当我导入 numpy 时,它没有显示错误,但之后当我导入 cv2 时,它显示:module not found。
【问题讨论】:
标签:
windows
python-2.7
opencv
numpy
pycharm
【解决方案1】:
点击链接How to install OpenCV on Windows and enable it for PyCharm without using the package manager
Install Python 2.7.10
Install Pycharm(If you have not done it already)
Download and install the OpenCV executable.
Add OpenCV in the system path(%OPENCV_DIR% = /path/of/opencv/directory)
Goto C:\opencv\build\python\2.7\x86 folder and copy cv2.pyd file.
Goto C:\Python27\DLLs directory and paste the cv2.pyd file.
Goto C:\Python27\Lib\site-packages directory and paste the cv2.pyd file.
Goto PyCharm IDE and goto DefaultSettings>PythonInterpreter.
Select the Python which you have installed on Step1.
Install the packages numpy,matplotlib and pip in pycharm.
Restart your PyCharm.
PyCharm now has OpenCV library installed and working.