Ask Your Question
0

no module named cv2 in Pycharm

asked 2016-11-22 22:39:39 -0500

updated 2016-11-27 21:15:29 -0500

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

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2016-11-23 00:53:06 -0500

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.

edit flag offensive delete link more

Comments

No,I have python 2.7 installed only.

Dean Feng gravatar imageDean Feng ( 2016-11-23 18:54:25 -0500 )edit
0

answered 2017-12-17 09:28:26 -0500

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-11-22 22:39:39 -0500

Seen: 8,603 times

Last updated: Nov 27 '16