I am trying to install and use OpenCV library for python development. I want to use it for PyCharm IDE. I am trying to do it without the package manager.
我正在尝试安装和使用OpenCV库进行python开发。我想将它用于PyCharm IDE。我试图在没有包管理器的情况下这样做。
The environment is a windows 64 bit architecture. For Python I am using Python 2.7.10.
环境是Windows 64位架构。对于Python,我使用的是Python 2.7.10。
I have already included the OpenCV directory in the system path.
我已经在系统路径中包含了OpenCV目录。
I am using python 2.7.10 interpreter for PyCharm and have installed the pip and numpy packages.
我正在为PyCharm使用python 2.7.10解释器并安装了pip和numpy包。
opencv version is 3.0.0
opencv版本是3.0.0
How do I enable OpenCV and make it working in PyCharm?
如何启用OpenCV并使其在PyCharm中运行?
1 个解决方案
#1
18
I finally figured out on how to solve this issue:
我终于想出了如何解决这个问题:
Steps to follow:
要遵循的步骤:
- 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.
安装Python 2.7.10
安装Pycharm(如果你还没有这样做)
下载并安装OpenCV可执行文件。
在系统路径中添加OpenCV(%OPENCV_DIR%= / path / of / opencv / directory)
转到C:\ opencv \ build \ python \ 2.7 \ x86文件夹并复制cv2.pyd文件。
转到C:\ Python27 \ DLLs目录并粘贴cv2.pyd文件。
转到C:\ Python27 \ Lib \ site-packages目录并粘贴cv2.pyd文件。
转到PyCharm IDE并转到DefaultSettings> PythonInterpreter。
选择Step1上安装的Python。
在pycharm中安装包numpy,matplotlib和pip。
重启你的PyCharm。
PyCharm现在已经安装并运行了OpenCV库。
#1
18
I finally figured out on how to solve this issue:
我终于想出了如何解决这个问题:
Steps to follow:
要遵循的步骤:
- 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.
安装Python 2.7.10
安装Pycharm(如果你还没有这样做)
下载并安装OpenCV可执行文件。
在系统路径中添加OpenCV(%OPENCV_DIR%= / path / of / opencv / directory)
转到C:\ opencv \ build \ python \ 2.7 \ x86文件夹并复制cv2.pyd文件。
转到C:\ Python27 \ DLLs目录并粘贴cv2.pyd文件。
转到C:\ Python27 \ Lib \ site-packages目录并粘贴cv2.pyd文件。
转到PyCharm IDE并转到DefaultSettings> PythonInterpreter。
选择Step1上安装的Python。
在pycharm中安装包numpy,matplotlib和pip。
重启你的PyCharm。
PyCharm现在已经安装并运行了OpenCV库。