SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: <rei...@gm...> - 2004年11月28日 13:56:08
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
> Hello everybody,
>
> I am new to this list and to the world of python, so I face some
> questions, which are hopefully difficult to me only.
> I use python2.3.4 and want to install matplotlib. I build all the
> necessary packages (which were quite a lot) and finally, it seems to
> work.
>
> import matplotlib does not produce any errors, though
> import matplotlib.matlab does:
>
> No module named pygtk
> PyGTK version 1.99.16 or greater is required to run the GTK Matplotlib
> backends
>
> But I have installed pygtk in the version2.4.1 without any errors and
> indeed
>
> import pygtk
>
> works without error. What am I doing wrong? I spend a lot of time to
> come to this point, but now I am running out of ideas. Can anyone help
> me?
> Thanks
> Reik
>
> ps: I tried to install wxPython in the first place, but the
> make-command always terminates, because it has some problems with
> finding files in .../mac/ogl/... something, so I decided to switch to
> the GTK-backend...
>
>
>
>
> --__--__--
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> End of Matplotlib-users Digest
>
From: Jochen V. <vo...@se...> - 2004年11月28日 23:13:13
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
--=20
http://seehuhn.de/
From: John H. <jdh...@ac...> - 2004年11月29日 15:01:56
>>>>> "Jochen" == Jochen Voss <vo...@se...> writes:
 Jochen> Actually I think this is fixed in CVS, isn't it?
I think so. In my cvs tree in setup.py, I have
if BUILD_GTKAGG:
 try:
 import gtk
 except ImportError:
 print 'GTKAgg requires pygtk'
 BUILD_GTKAGG=0
 except RuntimeError:
 print 'pygtk present but import failed'
If X is not present, they get the runtime error, and in this case GTK
will still build, right?
But you'll still need X to run the GTK backend....
JDH
From: John H. <jdh...@ac...> - 2004年11月28日 16:23:22
>>>>> "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> "/Library/Frameworks/Python.framework/Versions/2.3//lib/python2=
.3/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
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
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /