Installing opencv on Windows 10 with python 3.6 and anaconda 3.6

后端 未结 13 2292
庸人自扰
庸人自扰 2020-11-29 03:11

How to install opencv with python 3.6 and anaconda 3.6?

I tried conda install -c https://conda.binstar.org/menpo opencv3

but i get the following

13条回答
  •  误落风尘
    2020-11-29 03:41

    It's pretty simple..

    Install Anaconda 3.6. Check anaconda is added to System Variable Path.

    Open CMD and type conda install -c conda-forge opencv. This will install latest OpenCV version available (3.6).

    Open IDE editor and try import cv2. It will probably don't work...don't worry.

    You have to add cv2 command to editor.

    For Eclipse (with PyDev):

    Create firs a project and then do the following:

    Eclipse tutorial

    For PyCharm:

    cv2 module probably won't work. Go to the Anaconda folder/Lib/site-packages/cv2 and copy the file cv2.cp36-win_amd64.pyd to the site-packages folder. Rename it cv2.pyd

    Example2

    Now try to write a command... cv2.imread(). If auto-completition don't work, try cv2.cv2.imread(). This will work for sure.

提交回复
热议问题