1. Installing Python And OpenCV On Mac - Iqbal Ahmed
Maybe your like

I develop Android Apps along with Backendand My only LOVE is Kotlin
In this post we will install OpenCV and Python on MacOS
Install XCode
sudo xcodebuild -license sudo xcode-select installInstall Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew update #To resolve brew error git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow #To resolve brew error git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow brew update --force --quiet`Install Python3
#Installing python2 and python3 if not exist brew install python python3 #Symlink python2 and python3 brew link python brew link python3 #If python already installed then it may ask for an upgrade brew upgrade python brew upgrade python3 #Verify python installed correctly which python2 which python3 #Check python version python2 --version python3 --versionInstall OpenCV
# Install OpenCV 3 with Python2 and Python3 bindings brew install opencv@3 #add OpenCV site-packages path to global site-packages echo /usr/local/opt/opencv@3/lib/python3.9/site-packages >> /usr/local/lib/python3.9/site-packages/opencv3.pth #In case of the path not found, update the python version in the path #if python version is Python 3.9.2 then the path should be /python3.9/Test OpenCv
python3 import cv2 print(cv2.__version__) import numpy as np print(np.__version__)Install OpenCV in Virtual Environment
Install virtualenv
pip install virtualenv virtualenvwrapper echo "VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3" >> ~/.bash_profile echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile source ~/.bash_profileCreate Environment
mkvirtualenv opencv-py3 -p python3 workon opencv-py3 pip install numpy ipython scipy pandas scikit-image scikit-learn matplotlib cd ~/.virtualenvs/opencv-py3/lib/python3.9/site-packages/ ln -s /usr/local/opt/opencv@3/lib/python3.9/site-packages/cv2.cpython-39m-darwin.so cv2.so deactivateTest OpenCV in virtualenv
workon opencv-py3 ipython import cv2 print(cv2.__version__) import numpy as np print(np.__version__) deactivateSay something
Thanks for your comment! It will be shown on the site once it has been approved. Sorry, there was an error with your submission. Please make sure all required fields have been completed and try again.
Comments
Nothing yet.
How to add ktlint in Android ProjectOpenCV Series: 2. Get Started with OpenCV and Python- python7
- android6
- opencv6
- epoxy4
- dlib3
- image-processing3
- automation1
- kotlin-ktlint1
- script1
I develop Android Apps along with Backendand My only LOVE is Kotlin
Tag » How To Install Opencv Mac
-
How To Install Opencv 4 On MacOS? - GeeksforGeeks
-
Installation In MacOS - OpenCV
-
How To Install OpenCV For C++ On MacOS? - GeeksforGeeks
-
Install OpenCV 3 On MacOS - LearnOpenCV
-
Install OpenCV 4 On MacOS - PyImageSearch
-
How To Safely Install OpenCV On The Mac M1 - Roboflow Blog
-
Opencv-python - PyPI
-
OpenCV Installation On MacOS | Getting Started With OpenCV Series
-
Install OpenCV 4 On MacOS Using Homebrew - AICurious
-
Setting Up Mac With Apple Silicon For OpenCV Java Development
-
Building And Installing OpenCV 4.5.0 On An M1 Mac | Sayak Paul
-
Installing OpenCV
-
Opencv - Homebrew Formulae
-
Installing OpenCV 3 From Source On MacOS Catalina - Medium