Installing matplotlib

Hello, it's me again, I found my mistake, I specified the

    > wrong path when installing pygtk. But now, I have a problem
    > installing matplotlib. When I type

    > python setup.py build

    > it terminates with:

    > Traceback (most recent call last): File "setup.py", line
    > 125, in ? try: import gtk File
    > "/Library/Frameworks/Python.framework/Versions/2.3//lib/python2.3/site-
    > packages/gtk-2.0/gtk/__init__.py", line 37, in ? from _gtk
    > import * RuntimeError: could not open display

    > 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

Hope this helps,
JDH

First of all, thanks for your help.
I made several mistakes, which I fixed: I installed matplotlib as root 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. The
>sudo python setup.py install
ran without mistakes.

BUT: When I start python, and I want to import matplotlib.matlab, this 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 format for file '/Library/Frameworks/Python.framework/Versions/2.3/share/matplotlib/matplotlib.svg'
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/matlab.py", line 163, in ?
     from backends import new_figure_manager, error_msg, \
   File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/matplotlib/backends/__init__.py", line 20, in ?
     globals(),locals(),[backend_name])
   File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-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 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:

    > Hello, it's me again, I found my mistake, I specified the
    > wrong path when installing pygtk. But now, I have a problem
    > installing matplotlib. When I type

    > python setup.py build

    > it terminates with:

    > Traceback (most recent call last): File "setup.py", line
    > 125, in ? try: import gtk File
    > "/Library/Frameworks/Python.framework/Versions/2.3//lib/python2.3/site-
    > packages/gtk-2.0/gtk/__init__.py", line 37, in ? from _gtk
    > import * RuntimeError: could not open display

    > 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

macOS Sonoma - Apple

Hope this helps,
JDH

Hello,

···

On Sun, Nov 28, 2004 at 10:22:09AM -0600, John Hunter wrote:

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

Actually I think this is fixed in CVS, isn't it?

All the best,
Jochen
--