|
From: Stephen W. <ste...@cs...> - 2005-01-04 18:23:28
|
Fernando Perez wrote:
> I was getting a 'pygtk present but import failed' message, which I
> couldn't understand. I modified setup.py to reraise the exception at
> that point, and it turned out to be a RuntimeError('could not open
> display') exception.
Yes, I noticed the same thing when I tried to build matplotlib through
an SSH session which didn't have X forwarding enabled. I get the
message "pygtk present but import failed
Using default library and include directories for Tcl and Tk because a
Tk window failed to open. You may need to define DISPLAY for Tk to work
so that setup can determine where your libraries are located." The code
is in setupext.py starting at line 198:
try:
tk=Tkinter.Tk()
except Tkinter.TclError:
print "Using default library and include directories for Tcl and
Tk because a"
print "Tk window failed to open. You may need to define DISPLAY
for Tk to work"
print "so that setup can determine where your libraries are
located."
The 'import gtk' at line 149 in setup.py also fails if DISPLAY is not set.
|