How to install opencv in Python | opencv installation in Windows | OpenCV in Mac and Linux OS

preview_player
Показать описание
For latest version 4.1.0, use

pip install opencv-contrib-python==4.1.0.25 and
For default version use this:

pip install opencv-contrib-python

#python3
#learnpythonprogramming
#python
#opencv
#opencvpython
Рекомендации по теме
Комментарии
Автор

If you are using Linux, then try :

sudo pip install opencv-python==4.0.0.21

Please make sure in any operating system the previous version is uninstalled. Commonly cv2.pyd file in (search in Python27 folder in your pc ) should be removed if pip uninstall does not work. I recommend using latest version:

sudo pip install

And if you have any installation problem please let me know, I will quickly reply.

pyshine_official
Автор

IMPORTANT!!! For Linux, Ubuntu users: If installation with pip is successful and upon import cv2, this error occurs: python3: Relink with for IFUNC symbol `clock_gettime',
Then, a working solution is:
sudo apt install python3-opencv

pyshine_official
Автор

pip3 install opencv-contrib-python
Collecting opencv-contrib-python
Using cached (148.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.19.3 in (from opencv-contrib-python) (1.20.1)
Building wheels for collected packages: opencv-contrib-python
Building wheel for opencv-contrib-python (PEP 517) ... -/
runs forever on can I solve help !

codewithmac