Reputation: 11016
I am trying to use a python package (dlib) on my mac OSX running 10.12.3. However, the error I am getting is:
ImportErrordlopen(/Users/xargon/anaconda/envs/py27/lib/python2.7/site-packages/dlib.so, 2): Library not loaded: @rpath/libpng16.16.dylib
Referenced from: /Users/xargon/anaconda/envs/py27/lib/python2.7/site-packages/dlib.so
Reason: Incompatible library version: dlib.so requires version 41.0.0 or later, but libpng16.16.dylib provides version 39.0.0
I tried to update using:
brew upgrade libpng
However, this had no effect. I also uninstalled and reinstalled dlib after that.
Can someone tell me how I can upgrade my system so that this dependency is resolved?
Upvotes: 1
Views: 1538
Reputation: 69
Are you using a virtual environment? If yes, you need remove libpng from it completely by using brew uninstall libpng
. After that, you should deactivate the virtual environment and type brew uninstall libpng
.
After this, try to make the library again from scratch. This should solve your problem.
P.S. If you have multiple libpng versions installed, you need to remove them, too!
Upvotes: 1