Skip to content

Instantly share code, notes, and snippets.

@jabooth
Created April 4, 2014 12:54
Show Gist options
  • Save jabooth/9974135 to your computer and use it in GitHub Desktop.
Save jabooth/9974135 to your computer and use it in GitHub Desktop.
Library not loaded: /usr/local/lib/libpng15.15.dylib upon %matplotlib qt -> solution -> brew reinstall libpng qt
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-6ad73d0e50c7> in <module>()
----> 1 get_ipython().magic(u'matplotlib qt')
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2203 magic_name, _, magic_arg_s = arg_s.partition(' ')
2204 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2205 return self.run_line_magic(magic_name, magic_arg_s)
2206
2207 #-------------------------------------------------------------------------
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2124 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2125 with self.builtin_trap:
-> 2126 result = fn(*args,**kwargs)
2127 return result
2128
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in matplotlib(self, line)
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in matplotlib(self, line)
78 """
79 args = magic_arguments.parse_argstring(self.matplotlib, line)
---> 80 gui, backend = self.shell.enable_matplotlib(args.gui)
81 self._show_matplotlib_backend(args.gui, backend)
82
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_matplotlib(self, gui)
2941 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2942
-> 2943 pt.activate_matplotlib(backend)
2944 pt.configure_inline_support(self, backend)
2945
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in activate_matplotlib(backend)
285 matplotlib.rcParams['backend'] = backend
286
--> 287 import matplotlib.pyplot
288 matplotlib.pyplot.switch_backend(backend)
289
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py in <module>()
96
97 from matplotlib.backends import pylab_setup
---> 98 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
99
100
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
26 # imports. 0 means only perform absolute imports.
27 backend_mod = __import__(backend_name,
---> 28 globals(),locals(),[backend_name],0)
29
30 # Things we pull in from all backends
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py in <module>()
11
12 from backend_agg import FigureCanvasAgg
---> 13 from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
14 show, draw_if_interactive, backend_version, \
15 NavigationToolbar2QT
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py in <module>()
23 figureoptions = None
24
---> 25 from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
26
27 backend_version = __version__
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/qt4_compat.py in <module>()
54 verbose.report(cond+res, 'helpful')
55
---> 56 from PyQt4 import QtCore, QtGui
57
58 # Alias PyQt-specific functions for PySide compatibility.
ImportError: dlopen(/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/QtGui.so, 2): Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/lib/QtGui.framework/Versions/4/QtGui
Reason: image not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment