ChrisB
ChrisB

Reputation: 141

Importing matplotlib in Spyder (OSX 10.6)

When importing matplotlib in Spyder I get the following:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/pyplot.py", line 27, in <module>
    import matplotlib.colorbar
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/colorbar.py", line 34, in <module>
    import matplotlib.collections as collections
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/collections.py", line 27, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/backend_bases.py", line 56, in <module>
    import matplotlib.textpath as textpath
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/textpath.py", line 19, in <module>
    import matplotlib.font_manager as font_manager
  File "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/font_manager.py", line 57, in <module>
    from matplotlib import ft2font
ImportError: dlopen(/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/matplotlib/ft2font.so, 2): Symbol not found: _inflateReset2
  Referenced from: /Applications/Spyder-Py2.app/Contents/MacOS/../Frameworks/libpng16.16.dylib
  Expected in: /usr/lib/libz.1.dylib
 in /Applications/Spyder-Py2.app/Contents/MacOS/../Frameworks/libpng16.16.dylib

What can I do? I really don't get it. I run under mac OSX 10.6

Upvotes: 0

Views: 421

Answers (1)

Carlos Cordoba
Carlos Cordoba

Reputation: 34136

(Spyder dev here) The problem lies in some changes done by the Matplotlib team some time ago that made for us harder to support Mac OSX 10.6.

To do it, we would need to include our own version of zlib in our Mac app, and compile every package against it, something I considered too much work and a potential cause of bugs.

That's why I changed the minimal required version of our app to be 10.7, as can be seen in our documentation site.

Upvotes: 2

Related Questions