Python 3.5, OpenCV 3.2, Windows 7 64-bits, Anaconda 3, “ImportError: DLL load failed”

后端 未结 3 1116
情书的邮戳
情书的邮戳 2021-01-14 04:28

So many questions already about this topic, but I didn\'t find any satisfying answer about the \"DLL not found\" traditional issue.

  • I\'m using Python 3.5 insta
相关标签:
3条回答
  • 2021-01-14 05:06

    I had the same issue. This helps me:

    conda install -c menpo opencv3
    

    Found at https://www.scivision.co/install-opencv-python-windows/

    0 讨论(0)
  • 2021-01-14 05:18

    Regarding the comment in the question, always remove any existing opencv package before installing another one because, opencv from unofficial and official sites will be considered as 2 packages by pip.

    You can install official opencv if you follow my answer here. You get that error because of a problem with Anaconda.

    But if you install official opencv it will autocomplete and give suggestions in your python IDE (see this). So, if you need autocomplete as well, you need to go with unofficial opencv.

    0 讨论(0)
  • As mentioned in the comment which I didn't notice at first, you can resolve this by installing from the unofficial site (Gohlke) (http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv)

    I uninstalled the official one by calling:

    pip uninstall opencv-python
    

    And then downloaded the .whl package from the mentioned site (you need to carefully choose the correct python version and the correct processor architecture x86 or x64).

    And then, go to the path where the .whl file is downloaded and call:

    pip install opencv_python-x.x.x-cpxx-cpxxm-win_xx.whl
    
    0 讨论(0)
提交回复
热议问题