Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Last active January 8, 2022 12:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthewjberger/bece74297ddc5a3d7b2f996f44123d66 to your computer and use it in GitHub Desktop.
Save matthewjberger/bece74297ddc5a3d7b2f996f44123d66 to your computer and use it in GitHub Desktop.
How to Install OpenCV 3, OpenCV_Contrib, and nteract on Windows

Installing OpenCV on Windows

First open a powershell terminal install the scoop package manager:

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

Note: if you get an error you might need to change the execution policy (i.e. enable Powershell) with:

Set-ExecutionPolicy RemoteSigned -scope CurrentUser

Then add the extras bucket:

scoop bucket add extras

and install nteract:

scoop install nteract

Python 2.x

scoop bucket add versions
scoop install python27

Python 3.x

scoop install python

Install OpenCV and supporting libraries

pip install opencv-python opencv-contrib-python numpy matplotlib
python -m pip install ipykernel
python -m ipykernel install --user

Switch to Python 2.x

scoop reset python27

Switch to Python 3.x

scoop reset python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment