OpenCV Python3.6 Path : /usr/local/Cellar/opencv/3.3.1_1/lib/python3.6/site-packages/ usr/local/Cellar/opencv/3.3.1_1/lib/python3.6/site-packagesĬv2.cpython-36m-darwin.so # this name might be different but. Get the Python 3.6 cv2.so file path: $ cd /usr/local/Cellar/opencv/3.3.1_1 You can installwhatever version you want. ![]() In the meantime, let's get the cv2.so for each version of Python. I'll just need to add the correct cv2.so to your Python's site packages. If I want both versionsto have OpenCV, I can. I have Python 3.6 and Python 2.7 installed on my system. Now we needto link it to our version of Python. Okay, so wehave the OpenCV version we're going to use and where it's located. We're very close to getting the cv2.so we need. Thisis the OpenCV Version we want to use. You'll want the highest version number listed here, in my case it's 3.3.1_1 $ cd 3.3.1_1Īwesome. In my case, the numbers 3.3.0_3 and 3.3.1_1 are different versions of OpenCV. Since weinstalled OpenCV with Homebrew, the package was should be listed in homebrew'sCellar ( /usr/local/Cellar/ ) To see what's in the Brew Cellar, do this: $ brew list ![]() Install OpenCV with homebrew including Python 3 $ brew install opencv3 -with-contrib -with-python3 ![]() Tap homebrew-bio $ brew tap brewsci/bioģ. Install and update homebrew $ /usr/bin/ruby -e "$(curl -fsSL )"Ģ. Step 2: Install OpenCV 3 for Python on Macġ. To install virtualenv via pip run: $ pip3 install virtualenvĬreation of virtualenv: $ virtualenv -p python3 Īctivate the virtualenv: $ source /bin/activate Step 1: Setting Up and Using Python 3 Virtualenv on Mac $ brew install python3
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |