Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some update removed /usr/local/lib/libpng15.15.dylib which is required by mplotqueries(matplotlib) #374

Closed
jimoleary opened this issue Jul 25, 2015 · 1 comment

Comments

@jimoleary
Copy link
Contributor

This is more of a note in case anyone else encounters the same problem but ..
Some update on my Mac (not sure exactly what) seems to have removed libpng15.15.dylib or maybe the dependency changed in matplotlib.

Anyway a quick fix to get mplotqueries loading matplotlib was to create a link from libpng16.16.dylib to libpng15.15.dylib:

$ ln -s  /usr/local/lib/libpng16.16.dylib  /usr/local/lib/libpng15.15.dylib

Note this means mplotqueries can't save any files, I got the following error:

libpng warning: Application built with libpng-1.5.17 but running with 1.6.17
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 472, in save_figure
self.canvas.print_figure(filename)
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 2220, in print_figure
*_kwargs)
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 1962, in print_png
return agg.print_png(_args, **kwargs)
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 517, in print_png
filename_or_obj, self.figure.dpi)
RuntimeError: Could not create write struct

The following appears to have fixed the issue more permanently but may be overkill:

$ curl --remote-name --location http://download.sourceforge.net/libpng/libpng-1.5.21.tar.gz
$ tar -zxvf libpng-1.5.21.tar.gz
$ cd libpng-1.5.21
$ ./configure --enable-maintainer-mode
$ make maintainer-clean
$ LIBTOOLIZE=glibtoolize  ./autogen.sh --maintainer --clean
$ LIBTOOLIZE=glibtoolize  ./autogen.sh --maintainer 
$ ./configure
$ make
$ make install
@jimoleary
Copy link
Contributor Author

looks like it was also already in /opt/X11/lib/libpng15.15.dylib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants