Importing OpenCV into anaconda fails

I am trying to use OpenCV under Anaconda for Python2.7.8.final.0. I did a fresh install of Anaconda and then imported the latest (win-64) OpenCV distribution (2.4.9.1-np19py27_0) using the conda tool ... all that seemed to work, new libraries appear from the> conda list. Everything is in default locations.

I ran the launcher, updated, and then ran spyder and got this: On the IPython command line:


In [1]: import cv Traceback (last call last):

File "", line 1, in import cv

File "C: \ Anaconda \ lib \ site-packages \ cv.py", line 1, c from cv2.cv import *

ImportError: DLL load error: The specified module could not be found.


Ok, looks like a simple path problem? So many questions have been answered. I'm going to look at PYTHONPATH. In Spyder I find the PYTHONPATH Manager tool that does not show paths. Early help says the path is misleading, bad, commenting was a fix, so what should it be?

The second item from the tool menu appears directly in the Windows environment. Key "HKEY_CURRENT_USER \ Environment" "Path" is empty.

In fact, right clicking on python console options sometimes gives insight into many other environment variables. My window path:

['C: \ Anaconda \ Lib \ site-packages \ PyQt4', 'C: \ Anaconda \ Lib \ site-packages \ PyQt4', 'C: \ Anaconda \ Lib \ site-packages \ NumPy \ kernels',' C : \ Anaconda \ Scripts ',' C: \ Program Files \ Common Files \ Microsoft Shared \ Windows Live ',' C: \ Program Files (x86) \ Common Files \ Microsoft Shared \ Windows Live ',' C: \ Program Files (x86) \ Intel \ iCLS Client \ ',' C: \ Program Files \ Intel \ iCLS Client \ ',' C: \ Windows \ system32 ',' C: \ Windows ',' C: \ Windows \ System32 \ Wbem ',' C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ ',' C: \ Program Files \ Intel \ WiFi \ bin \ ',' C: \ Program Files \ Common Files \ Intel \ WirelessCommon \ ',' C: \ Program Files \ Intel \ Intel (R) Management Engine Components \ DAL ',' C: \ Program Files \ Intel \ Intel (R) Engine Engine Components \ IPT ',' C:\ Program Files (x86) \ Intel \ Intel (R) Management Engine Components \ DAL ',' C: \ Program Files (x86) \ Intel \ Intel (R) Engine Engine Components \ IPT ',' C: \ Program Files ( x86) \ Windows Live \ Shared ',' C: \ Program Files (x86) \ GitExtensions \ ',' C: \ Program Files \ MiKTeX 2.9 \ miktex \ bin \ x64 \ ',' C: \ Anaconda ',' C : \ Anaconda \ Scripts', '']

which looks pretty thorough.

So what gives? I installed it incorrectly, ran it incorrectly, something else?

thank

+3


source to share





All Articles