Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
230 views
in Technique[技术] by (71.8m points)

python - How to install OpenCV on Windows and enable it for PyCharm without using the package manager

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.

The environment is a windows 64 bit architecture. For Python I am using Python 2.7.10.

I have already included the OpenCV directory in the system path.

I am using python 2.7.10 interpreter for PyCharm and have installed the pip and numpy packages.

opencv version is 3.0.0

How do I enable OpenCV and make it working in PyCharm?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I finally figured out on how to solve this issue:

Steps to follow:

  1. Install Python 2.7.10
  2. Install Pycharm(If you have not done it already)
  3. Download and install the OpenCV executable.
  4. Add OpenCV in the system path(%OPENCV_DIR% = /path/of/opencv/directory)
  5. Goto C:opencvuildpython2.7x86 folder and copy cv2.pyd file.
  6. Goto C:Python27DLLs directory and paste the cv2.pyd file.
  7. Goto C:Python27Libsite-packages directory and paste the cv2.pyd file.
  8. Goto PyCharm IDE and goto DefaultSettings>PythonInterpreter.
  9. Select the Python which you have installed on Step1.
  10. Install the packages numpy,matplotlib and pip in pycharm.
  11. Restart your PyCharm.
  12. PyCharm now has OpenCV library installed and working.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...