Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install pyopencv via python pip




pyopencv - PyOpenCV - A Python wrapper for OpenCV 2.x using Boost.Python and NumPy, it belongs to Classifiers:

- Intended Audience :: End Users/Desktop
- Operating System :: Unix
- Topic :: Multimedia
- Topic :: Multimedia :: Graphics
- Topic :: Multimedia :: Video
- Topic :: Scientific/Engineering :: Artificial Intelligence
- Topic :: Scientific/Engineering :: Human Machine Interfaces

When you know about this project and you want to new install pyopencv to support your project or you get trouble as ModuleNotFoundError: No module named "pyopencv" or ImportError: cannot import name "pyopencv" in your project, let follow this tutorial to install pyopencv



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_pyopencv_env

- Active the virtual environment

test_pyopencv_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_pyopencv_env

- Active the virtual environment

source test_pyopencv_env/bin/active


Step 2: OK, now, let flow below content to start the installation pyopencv

To install pyopencv on Windows(CMD):

py -m pip install pyopencv

To install pyopencv on Unix/macOs:

pip install pyopencv


Step 3: If you want to install a specific pyopencv version, add ==<pyopencv version> to the end command line

Example:

pip install pyopencv==2.0.wr1.0.1


Please see the version list below table:

VersionReleased dateCommand
pyopencv 2.1.0.wr1.2.02010-09-25T15:47:59Windows:

py -m pip install pyopencv==2.1.0.wr1.2.0

Unix/macOs:

pip install pyopencv==2.1.0.wr1.2.0

pyopencv 2.1.0.wr1.1.02010-07-18T21:43:31Windows:

py -m pip install pyopencv==2.1.0.wr1.1.0

Unix/macOs:

pip install pyopencv==2.1.0.wr1.1.0

pyopencv 2.1.0.wr1.0.22010-05-02T15:34:44Windows:

py -m pip install pyopencv==2.1.0.wr1.0.2

Unix/macOs:

pip install pyopencv==2.1.0.wr1.0.2

pyopencv 2.1.0.wr1.0.12010-04-13T16:32:15Windows:

py -m pip install pyopencv==2.1.0.wr1.0.1

Unix/macOs:

pip install pyopencv==2.1.0.wr1.0.1

pyopencv 2.1.0.wr1.0.02010-04-08T00:11:05Windows:

py -m pip install pyopencv==2.1.0.wr1.0.0

Unix/macOs:

pip install pyopencv==2.1.0.wr1.0.0

pyopencv 2.0.wr1.1.02010-02-27T16:22:06Windows:

py -m pip install pyopencv==2.0.wr1.1.0

Unix/macOs:

pip install pyopencv==2.0.wr1.1.0

pyopencv 2.0.wr1.0.12010-02-07T14:52:57Windows:

py -m pip install pyopencv==2.0.wr1.0.1

Unix/macOs:

pip install pyopencv==2.0.wr1.0.1


Step 4: Otherwise, you can install pyopencv from local archives:

Download the distribution file from pyopencv-2.1.0.wr1.2.0.tar.gz or the specific pyopencv version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_pyopencv_downloaded_file>

On Unix/macOs:

pip install <path_to_pyopencv_downloaded_file>


List distribution:


Project link:

- Homepage