Discussion:
[Tkinter-discuss] want to build Python with Tkinter on Linux
Kevin Buchs
2011-03-21 20:45:40 UTC
Permalink
I have locked-down (by others) Linux systems, so I need my own custom
install of Python (2.7). I have yet to get Tkinter working in the build
process. Python will be in a non-standard location and Tcl/Tk are in a
non-standard location. I get these messages from a "make":

$ make
running build
running build_ext
building dbm using gdbm
INFO: Can't locate Tcl/Tk libs and/or headers

Python build finished, but the necessary bits to build these modules were
not found:
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

running build_scripts

Do there exist any build instructions to direct me as to how to fix this? I
am not seeing anything in configure.
--
Kevin Buchs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110321/34522073/attachment.html>
Tim Jones
2011-03-21 21:14:21 UTC
Permalink
Post by Kevin Buchs
$ make
running build
running build_ext
building dbm using gdbm
INFO: Can't locate Tcl/Tk libs and/or headers
_tkinter bsddb185 dl
imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
running build_scripts
Do there exist any build instructions to direct me as to how to fix this? I am not seeing anything in configure.
I use custom locations all the time - have you tried the "--prefix=" setting for configure?

./configure --prefix=/home/secureuser/

That would put everything into /home/secureuser/lib/ and /home/secureuser/bin/. Just be aware that all of the peojects need the same prefix setting.

Tim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110321/7ebf25b9/attachment.html>
Kevin Buchs
2011-03-21 21:42:24 UTC
Permalink
Tim,

Thanks for your reply. This will handle the Python install path. But I can't
get Python to build with Tkinter.

- Kevin Buchs
Post by Tim Jones
I use custom locations all the time - have you tried the "--prefix=" setting for configure?
./configure --prefix=/home/secureuser/
That would put everything into /home/secureuser/lib/ and
/home/secureuser/bin/. Just be aware that all of the peojects need the same
prefix setting.
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110321/f74981e0/attachment.html>
Tim Jones
2011-03-21 22:25:41 UTC
Permalink
As I mentioned, you would need to provide the same --prefix for the TCL/TK build as well.

I build in this order:

tcl
tk
expect
python

They are all built with "configure --prefix=/home/secureuser" (secureuser is a sandbox user on my systems).

Tim
Tim,
Thanks for your reply. This will handle the Python install path. But I can't get Python to build with Tkinter.
- Kevin Buchs
I use custom locations all the time - have you tried the "--prefix=" setting for configure?
./configure --prefix=/home/secureuser/
That would put everything into /home/secureuser/lib/ and /home/secureuser/bin/. Just be aware that all of the peojects need the same prefix setting.
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110321/90eabf77/attachment.html>
Michael Lange
2011-03-22 11:12:31 UTC
Permalink
Hi Kevin,

Thus spoketh Kevin Buchs <kevin.buchs at gmail.com>
Post by Kevin Buchs
I have locked-down (by others) Linux systems, so I need my own custom
install of Python (2.7). I have yet to get Tkinter working in the build
process. Python will be in a non-standard location and Tcl/Tk are in a
$ make
running build
running build_ext
building dbm using gdbm
INFO: Can't locate Tcl/Tk libs and/or headers
Have you tried to call

$ export LD_LIBRARY_PATH=/usr/local/lib

before ./configure (of course with your actual "tcl-lib-path"
instead of /usr/local/lib)? At least here (debian lenny) this helps, I
think it is even documented somewhere, although I can't remember where ;)

Regards

Michael


.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.

Intuition, however illogical, is recognized as a command prerogative.
-- Kirk, "Obsession", stardate 3620.7
Kevin Buchs
2011-03-22 16:25:53 UTC
Permalink
Hey! It works great, incorporating both hints. Thanks, guys.
--
Kevin Buchs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110322/49ec1d04/attachment.html>
Loading...