Installing OpenCV4.1 with Python3.7 on Windows10 (Latest)

In this post we will learn how to install the latest OpenCV4.1 with Python3.7 on Windows10. Earlier I had shared a post on Installing OpenCV3.3 with Python3 on Windows10 which included long instructions and building the package locally on the machine. And Boy! Did that take time?

Today We’ll achieve the same task but in a very short time compared to earlier methods. Firstly we need to install Python3.7 and Pip (Package Manager) on the system. (Recommendation: Use Anaconda)

When you type python on the terminal or the command prompt, you should get something like this:

Image for post
Image for post
We’ve got Python3.7 installed

Lets check whether we’ve got pip as well and get it updated to the latest version:

Image for post
Image for post
Looks like everything is setup is ready!

Now lets install the additional packages using pip:

pip install numpy

pip install scipy

pip install matplotlib

pip install scikit-learn

pip install scikit-image

After installing these packages we are ready to install the OpenCV4.1 with additional modules:

Image for post
Image for post
Choosing this file as I have Python 3.7 and a 64 Bit Windows10
  1. Visit this URL: https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
  2. Download: opencv_python‑4.1.0+contrib‑cp37‑cp37m‑win_amd64.whl
  3. After the download is complete, Go to the folder and run:

pip install .\opencv_python‑4.1.0+contrib‑cp37‑cp37m‑win_amd64.whl

If you see the message as Successfully installed opencv-python-4.1.0+contrib it means that the Installation was successful.

Image for post
Image for post
Try importing the modules & check for version to verify the installation

With this we have successfully completed the installation of OpenCV4.1 with Contrib modules on our Windows10 computer. Now what are we waiting for, Lets start our Image Processing Adventures.

Written by

Blockchain Developer, Computer Vision Enthusiast and a Seasoned IoT Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store