English 中文(简体)
OpenCV Python - Environment
  • 时间:2024-11-03

OpenCV Python - Environment Setup


Previous Page Next Page  

In most of the cases, using pip should be sufficient to install OpenCV-Python on your computer.

The command which is used to install pip is as follows −


pip install opencv-python

Performing this installation in a new virtual environment is recommended. The current version of OpenCV-Python is 4.5.1.48 and it can be verified by following command −


>>> import cv2
>>> cv2.__version__
 4.5.1 

Since OpenCV-Python repes on NumPy, it is also installed automatically. Optionally, you may install Matplotpb for rendering certain graphical output.

On Fedora, you may install OpenCV-Python by the below mentioned command −


$ yum install numpy opencv*

OpenCV-Python can also be installed by building from its source available at http://sourceforge.net Follow the installation instructions given for the same.

Advertisements