If you want to import the 3.x.x version, add the following line at the top of your script to temporarily add the new site-packages subdirectory to the PYTHONPATH:.$ ln -s /usr/local/Cellar/opencv3/3.x.x/lib/python2.7/site-packages/cv2.so \ Create another subdirectory inside site-packages, for example, /opencv3 and put a symlink to the 3.x.x cv2.so file in there:.usr/local/lib/python2.7/site-packages/cv2.so Homebrew Python imports that module via a symlink at:.Both the above libraries contain a Python module cv2.so, stored at a path similar (but not necessarily identical) to:.brew install opencv3 creates /usr/local/Cellar/opencv3/. brew install opencv creates /usr/local/Cellar/opencv/.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |