From: <rei...@gm...> - 2004-11-28 16:37:02
|
First of all, thanks for your help. I made several mistakes, which I fixed: I installed matplotlib as root =20= and from xterm. The installation process worked out fine,the output of >python setup.py build was TKAgg requires TkInter running build running build_py running build_ext which is ok, I think. At least it doesn't say "require pygtkg" anymore. =20= The >sudo python setup.py install ran without mistakes. BUT: When I start python, and I want to import matplotlib.matlab, this =20= happens: Python 2.3.4 (#2, Nov 14 2004, 18:39:27) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.matlab Could not load matplotlib icon: Couldn't recognize the image file =20 format for file =20 '/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/=20 matplotlib.svg' Traceback (most recent call last): File "<stdin>", line 1, in ? File =20 "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-=20= packages/matplotlib/matlab.py", line 163, in ? from backends import new_figure_manager, error_msg, \ File =20 "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-=20= packages/matplotlib/backends/__init__.py", line 20, in ? globals(),locals(),[backend_name]) File =20 "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-=20= packages/matplotlib/backends/backend_gtkagg.py", line 16, in ? from _gtkagg import agg_to_gtk_drawable ImportError: No module named _gtkagg I thought, everything ist ok, when the installation is completed =20 successfully - obviously I am wrong. But what now? I am lost... Thanks for your help Reik Am 28.11.2004 um 17:22 schrieb John Hunter: >>>>>> "Reik" =3D=3D Reik H B=F6rger <rei...@gm...> writes: > > Reik> Hello, it's me again, I found my mistake, I specified the > Reik> wrong path when installing pygtk. But now, I have a problem > Reik> installing matplotlib. When I type > > Reik> python setup.py build > > Reik> it terminates with: > > Reik> Traceback (most recent call last): File "setup.py", line > Reik> 125, in ? try: import gtk File > Reik> =20 > "/Library/Frameworks/Python.framework/Versions/2.3//lib/python2.3/=20 > site- > Reik> packages/gtk-2.0/gtk/__init__.py", line 37, in ? from _gtk > Reik> import * RuntimeError: could not open display > > Reik> What is going wrong? I have no idea... Thanks Reik > > This is an annoying build issue that hopefully we'll resolve before > too long. I assume you are building from the Terminal shell is OSX. > You'll need build and run matplotlib from the X terminal > > http://www.apple.com/macosx/features/x11/ > > Hope this helps, > JDH > |