8

I'm having some trouble installing OpenCV. I have been using Anaconda, and I copied the cv2.pyd file into the ...\Lib\site-packages folder. When I get type import cv2 into Python I get this error:

`Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.`

I've also tried a pip install via command prompt: C:\Users\SCD>pip install cv2 results: `

Collecting cv2
Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2`

Can someone help?

SCD
  • 81
  • 1
  • 1
  • 5
  • 1
    Possible duplicate of [Installing OpenCV for Python on Ubuntu, getting ImportError: No module named cv2.cv](http://stackoverflow.com/questions/25215102/installing-opencv-for-python-on-ubuntu-getting-importerror-no-module-named-cv2) – TemporalWolf Jun 28 '16 at 20:26
  • Where did you get `cv2.pyd`? – MattDMo Jun 28 '16 at 20:47
  • Did u solve the problem? I have the same issue and don't know what I should do... – Kjenos Oct 14 '16 at 09:08

3 Answers3

31

Had the same problem, solved by using the below command to install "opencv-python":

pip install opencv-python
Chilloutman
  • 447
  • 2
  • 13
ElMix
  • 311
  • 3
  • 4
-1

I think the proper input should be 'import cv2' not 'install cv2'. After this print cv2.version should show you that it installed properly. Hope this helps.

Nick Read
  • 7
  • 6
-3

Try running the following:

$ python
>>> import cv2
>>> print cv2.__version__
nisargap
  • 25
  • 3