I have installed opencv3 using brew, but am facing importError
while executing import cv2
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
Referenced from: /usr/local/Cellar/opencv/2.4.12_2/lib/libopencv_highgui.2.4.dylib
Reason: Incompatible library version: libopencv_highgui.2.4.dylib requires version 37.0.0 or later, but libpng16.16.dylib provides version 35.0.0
Can someone help ?
The following resolved the problem.
brew uninstall --force brew-cask
brew uninstall --force opencv
brew doctor
brew tap homebrew/science
brew install opencv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With