On Tue, 01 Dec 2009 at 07:04PM -0500, Timothy Davis wrote: > Dear Sage-support: > > I am trying to build Sage 4.2.1 from source on a Linux machine running SUSE > Linux Enterprise Server 10 (x86_64). > > The build proceeds to the end, but I have a persistent problem with the > build process failing to find the "bits" for Tkinter. I have seen your FAQ > item which addresses the Tkinter problem in Sage builds, but I don't have > access to the tcl developer library. It appears to be software which isn't > Open Source, and it does not seem to be part of the SLED distro on my > machine. Is there another work around to resolve this issue? > > What I find strange is that I can build Python 2.6 "stand-alone" from source > on the same machine using the same version of gcc I used for sage, provided > that I have the path to the tcl/tk libraries in the environment variable > LD_LIBRARY_PATH. That doesn't work for the 'sage' build, nor does using > LD_RUN_PATH. > > My main goal is to have access to the numpy/scipy/matplotlib tools, and I'm > finding that building some of those pieces individually for a "stand-alone" > python 2.6 isn't all that easy. It's attractive to use something like sage > which relieves me of the burden of having to find and build all of the parts > and pieces for a useful python environment. > > Also, I looked at the pre-built binary distros of sage, and there isn't one > for SLED 10 -- the SuSE 11 version doesn't work on my system. > > I've included a little more system info below. > > Thanks in advance. > > T. Davis > > > uname -arv > Linux rds625 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64 > x86_64 x86_64 GNU/Linux > > Dual-Core AMD Opteron(tm) Processor 2222 > cpu Mhz 3000.000 > 16 Gbyte physical memory > > SUSE Linux Enterprise Server 10 (x86_64) > VERSION = 10 > PATCHLEVEL = 1 > > sage-4.2.1/spkg> gcc --version > gcc (GCC) 4.2.3 > > sage-4.2.1/spkg> g++ --version > g++ (GCC) 4.2.3 > > From my local, stand-alone installation of python2.6, built with tcl/tk > libraries in LD_LIBRARY_PATH: > >>> import Tkinter > >>> Tkinter._test()
When I try the above import line, I get (Ubuntu 9.10 amd64):
sage: import Tkinter
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
...
/opt/sage/local/lib/python2.6/lib-tk/Tkinter.py in <module>()
37 # Attempt to configure Tcl/Tk without requiring PATH
38 import FixTk
---> 39 import _tkinter # If this fails your Python may not be configured
for Tk
40 tkinter = _tkinter # b/w compat for export
41 TclError = _tkinter.TclError
ImportError: No module named _tkinter
The comment says our Python may not be configured for Tk, which makes me
think that we could fix this by changing the way we configure and
install our Python spkg. Looking through the Python build setup, I see
that it automatically tries to build Tkinter, but for Sage, generally
fails because it can't find the header files. Maybe try installing those
headers and try recompiling Sage's Python spkg?
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
signature.asc
Description: Digital signature
