I had two matplotlib troubles with
libfreetype.6.dylib
libpng15.15.dylib
It said these are missing. So I created /opt/local/lib/ and made link to the required files like this
#lib> pwd
/opt/X11/lib
#lib> ls -lrt
total 16
lrwxr-xr-x 1 34 11 Jun 11:11 libfreetype.6.dylib -> /opt/local/lib/libfreetype.6.dylib
lrwxr-xr-x 1 32 11 Jun 11:12 libpng15.15.dylib -> /opt/local/lib/libpng15.15.dylib
Now I get no errors. 🙂
PS
This is the error I got. ======================
>>> import matplotlib.pyplot
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py”, line 26, in
from matplotlib.figure import Figure, figaspect
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py”, line 32, in
from matplotlib.image import FigureImage
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/image.py”, line 22, in <module>
import matplotlib._png as _png
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_png.so, 2): Library not loaded: /opt/X11/lib/libpng15.15.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_png.so
Reason: image not found
===============================================