Sorry, this content is no longer available

Ask Your Question
0

no module named cv2 in Pycharm

asked Nov 23 '16

updated Nov 28 '16

image description

I have put the cv2.pyd into C:\Python27\Lib\site-packages,but Pycharm can not find this module. And can use opencv normally.

Maybe It's did't install by pip.

How can I solve this problem?

OpenCV Version: 3.0.0
Pycharm Version: Conmunity Edition 2016.2.3
OS : Windows 7 64bit

Preview: (hide)

2 answers

Sort by » oldest newest most voted
1

answered Nov 23 '16

Do you have both python 2.7 and 3.5 installed? If so, make sure that your PyCharm project is using Python 2.7 as the interpreter.

Preview: (hide)

Comments

No,I have python 2.7 installed only.

Dean Feng gravatar imageDean Feng (Nov 24 '16)edit
0

answered Dec 17 '17

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.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Nov 23 '16

Seen: 11,203 times

Last updated: Nov 27 '16