python3.6 install opencv

I used Opencv frequently in C++ before, and recently I am using python, so I want to use Opencv in python.

My software platform is win10 (64-bit), python3.6 installed through Anconda3.

At first, I searched for relevant literature on the Internet, and I recommend a blog post here: http://blog.csdn.net/lwplwf/article/details/61616493

Recommended blog post method Some people can install Opencv well, some people have problems with installation, unfortunately I also have problems with installation.

I first downloaded the opencv_python-3.3.0-cp36-cp36m-win_amd64.whl file and put it in the Anaconda3\Lib\site-packages folder (the download address is in the recommended blog post )



Then win+R, enter cmd, enter the Anaconda3\Lib\site-packages folder, and perform pip installation



After installation, enter the python environment to import cv2 and report an error, saying that the corresponding components of numpy are missing. I guess the version of numpy is too old (guess right)

Then I tried to install the new numpy to try.

First delete the numpy folder and the numpy-1.12.1+mkl.dist-info folder in the Anaconda3\Lib\site-packages folder.

Then download the numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl file and put it in Anaconda3\Lib\site-packages (the download location is the same as just now)


Then use the same method to pip install, and then enter the python environment, try to import numpy, import cv2 is all right.

Note that the two folders mentioned above must be deleted before installing the new numpy.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325473396&siteId=291194637