user20707
user20707

Reputation: 7

Is OpenCV 3.4.3 compatible with Python 3.6.7?

I am new to installing OpenCV and I want to install python 3.6.7 and a compatible OpenCV version. I want to install it on 64bit windows 10 laptop. How can I do this?

Upvotes: 0

Views: 2228

Answers (1)

Diroallu
Diroallu

Reputation: 856

OK, if you are using python 3.6 - 64bits in windows OS (please be sure that it appear at the begin on your "python command line") first of all you have to go to this page: "https://www.lfd.uci.edu/~gohlke/pythonlibs/"

To install "opencv" library you first need "Numpy" library so let's download this right here: enter image description here

let's download opencv library too:

enter image description here

There is an easy way to install these 2 libraries on windows: 1.- Unzip these files (I recommend you 7zip to do it) and in the case of numpy we will have this files:

enter image description here

Let's copy "Numpy" and "numpy-1.15.4+mkl.data" files (I have 1.14.0 version, don't worry about that) to this path: "Python36\Lib\site-packages" (the path to Python36 depends of where you installed it).

import numpy on your python command line, if not appear any error, we have finished of installing numpy on windows 10.

In the case of opencv is a little different, when we unzip .whl file of opencv, we will have these files: enter image description here

let's enter to "opencv_python-3.4.1.data" --> "data" --> "Lib" --> "site-packages". and then copy all files inside "site-packages" directory to "Python36\Lib\site-packages" (the same directory where we paste numpy library)

as same as in the case of numpy, import opencv on your python command line using "import cv2", if not appear any error, we have finished of installing opencv on windows 10.

There is another way to install .whl libraries on windows using PIP but you have to be sure that your python can be called from cmd (there is an option when you installed python called "add to path" to make this posible) also you have to have a good internet conection to prevent any posible error when installing. There are many tutorials in stackoverflow explaining PIP method. Hope this helps!.

Upvotes: 1

Related Questions