How to import cv2 in Python
![how to import cv2 in python](https://pythonpoint.net/wp-content/uploads/2020/11/how-to-import-cv2-in-python-1024x576.jpg)
For importing cv2, follow the steps given below:
At first you need to install opencv. For installing opencv, you need python 3
and pip
preinstalled in your system. Make sure that your pip
version is up-to-date (19.3 is the minimum supported version). To install pip:
pip install --upgrade pip
Check version with pip -V
To install OpenCV, go to the command-line and type the following command:
pip install opencv-python
To check if OpenCV is correctly installed, just run the following commands to perform a version check:
>>>import cv2 >>>print(cv2.__version__)
If the installation is sucessfull, the above command will display the version of opencv installed in your system.
Subscribe
Login
Please login to comment
0 Discussion