![]() When I try looking at the installed modules by typing help ('modules') I don't see cv or cv2. To verify I wrote a python script that simply contains: import cv2 print ('Hello') I get no module named cv2. Based on the terminal output it looks like that worked. Maybe you should change the two to your own OPENCV AND PYTHON site-packages directories.Įcho /usr/local/opt/opencv3/lib/python3.5/site-packages > /usr/local/lib/python3.5/site-packages/opencv3. OpenCV (Open Source Computer Vision Library) is a package for real-time computer vision and developed with support from Intel Research. After googling/stack overflow seraching I tried: brew install homebrew/science/opencv. Notes: In the follow command, /usr/local/opt/opencv3/lib/python3.5/site-packages is the directory of opencv3's site-packages, /usr/local/lib/python3.5/site-packages/ is the directory of Python3.5's site-packages. OR if you want install opencv2 for Python3: brew install opencv -with-python3įinally, maybe you will link site-packages of opencv to the site-packages of Python. This simply amounts to changing directories and creating a build directory: cd /opencv mkdir build cd build OpenCV 3 + Python 3.5 CMake template for macOS The next part, where we configure our actual build, gets a little tricky. OR install opencv2 for Python3: brew install opencv -with-python3 In order to compile OpenCV with Python 3.5 bindings for macOS we first need to set up the build. If you want install opencv3 for Python(Python2.7): brew install opencv3 -with-python Maybe you want install Python3: brew install python3 If you don't install Python, install python(brew will install python2.7): You can see the details for how to install homebrew. We can install opencv for Python for Mac OS X with home-brew.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |