Re: [spyder] matplotlib ImportError

321 views
Skip to first unread message

David Verelst

unread,
May 16, 2013, 8:04:01 AM5/16/13
to spyder
Hi,

Do you have the same issue in any other python shell, outside spyder? If so, than it seems this is an Matplotlib issue. Are you sure have all the matplotlib dependencies installed, including libpng? Some random stuff a search gave me:
http://telliott99.blogspot.dk/2011/07/matplotlib-on-os-x-lion-revised.html
http://penandpants.com/2012/03/01/install-python-2/

Not sure if that helped (I don't have a Mac)...anyway, I tried :-)

Regards,
David


On 15 May 2013 05:08, Dominik Schneider <dsch...@gmail.com> wrote:
Hi, I just installed Spyder having never used python before. I'm on OSX.6.8.   I opened Spyder and saw this error message in the console. matplotlib is one of the packages I came to python for so I want to figure this out. Can someone help sort this for me? Thanks

Python 2.7.3 (default, Jul 24 2012, 20:20:13)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/scientific_startup.py", line 16, in <module>
    from pylab import *  #analysis:ignore
  File "pylab.pyc", line 1, in <module>
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/pylab.py", line 222, in <module>
    from matplotlib import mpl  # pulls in most modules
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/mpl.py", line 2, in <module>
    from matplotlib import axis
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/axis.py", line 14, in <module>
    import matplotlib.text as mtext
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/text.py", line 29, in <module>
    from matplotlib.backend_bases import RendererBase
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/backend_bases.py", line 47, in <module>
    import matplotlib.textpath as textpath
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/textpath.py", line 11, in <module>
    from matplotlib.mathtext import MathTextParser
  File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/mathtext.py", line 61, in <module>
    import matplotlib._png as _png
ImportError: dlopen(/Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/_png.so, 2): Library not loaded: /usr/X11/lib/libpng15.15.dylib
  Referenced from: /Applications/Spyder.app/Contents/Resources/lib/python2.7/matplotlib/_png.so
  Reason: image not found

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dominik Schneider

unread,
May 18, 2013, 2:53:40 PM5/18/13
to spyd...@googlegroups.com
Hi,
 I only have standard apple python installed otherwise.  I was under the impression that Spyder.app came with what it needed and it seems to think so based on the paths it was searching (in the error message).  But I could be wrong. I"m still getting a handle on all the different python installations and tools. Could it be an X11 issue?

Carlos Córdoba

unread,
May 18, 2013, 3:11:16 PM5/18/13
to spyd...@googlegroups.com
Hi Dominik,

The problem is very simple: Our app only works with OSX 10.7 and 10.8, not 10.6, which is the version you have.

As you correctly guessed, this is an issue between matplotlib and X11. The Matplotlib version in the app requires libpng 1.5, and the last X11 version for 10.6 comes with libpng 1.2.

I'm sorry we don't have anymore support for 10.6 but I've monitored the download counts from previous versions and they were very low.

Cheers,
Carlos

El 18/05/13 13:53, Dominik Schneider escribió:

Dominik Schneider

unread,
May 18, 2013, 3:16:17 PM5/18/13
to spyd...@googlegroups.com
Bummer. but thanks for the info.

Dominik Schneider

unread,
May 25, 2013, 4:44:50 PM5/25/13
to spyd...@googlegroups.com
For future reference for someone else that finds this: I installed a newer libpng from http://ethan.tira-thompson.com/Mac_OS_X_Ports.html and Spyder starts without errors now. In my limited testing, plotting works now.

Simon Stevenson

unread,
Jun 20, 2013, 4:36:11 AM6/20/13
to spyd...@googlegroups.com
I can confirm that installing libpng from http://ethan.tira-thompson.com/Mac_OS_X_Ports.html solved the problem for me.

So thanks!

jcou...@gmail.com

unread,
Jun 28, 2013, 4:50:14 PM6/28/13
to spyd...@googlegroups.com
I had exactly the same error message, and now that i have installed the PNG library on http://ethan.tira-thompson.com/Mac_OS_X_Ports.html it seems to work fine.
I can plot graphs !
Reply all
Reply to author
Forward
0 new messages