How to Install opencv in python

Install the python in opencv module
(a) 1. Packages for standard desktop environments you create an environment:
There are four different packages and you should select only one of them. Do not install multiple different packages in the same environment. There is no plugin architecture: all the packages use the same namespace (cv2).
Open the command prompt and type this command press enter.

pip install opencv-python

Python

2. if you need both main and contrib modules (check extra module).type this command an press enter.

pip install opencv-contrib-python

Python

(b) 1. Packages for standard server environments you create an environment:
These packages do not contain any GUI functionality, type this command an press enter.

 pip install opencv-python-headless

2. if you need both main and contrib modules (check extra modules headless).
These packages do not contain any GUI functionality, type this command an press enter.

pip install opencv-contrib-python-headless
Social Share

Leave a Comment