How to install opencv in mac?

i have tried to run the command pip3 install opencv-contrib-python in the terminal but couldn’t install opencv. I have ananconda installed on my mac is there a way to install in my mac ?

Hey,
If you are using conda use this :
conda install -c conda-forge opencv or
conda install -c menpo opencv

If you are using pip :
pip install opencv-python
Python -m pip install opencv-python

After the installation, test the package with this command.
import cv2

I solved the issue by first running these commands in the terminal

cd /anaconda3/bin
ls *.app
rm -rf *.app

and then calling the function

conda install -c menpo opencv

1 Like

Great.
glad that you tried on your own :slight_smile: