Ubuntu package "python3" does not include tkinter

Antoon Pardon antoon.pardon at rece.vub.ac.be
Mon Apr 22 08:52:39 EDT 2013


Op 22-04-13 11:18, Steven D'Aprano schreef:
> On Mon, 22 Apr 2013 03:08:24 -0500, Andrew Berg wrote:
>
>> Much of the stdlib doesn't rely on anything but the core interpreter.
>> tkinter by itself is not the issue. As you said, the bindings are tiny.
>> However, in order to be usable, it requires quite a few things - most
>> notably X. On desktop Linux, this is already installed, but on server
>> systems, it generally is not (or at least shouldn't be in most cases).
>> Going back to my example of a web server using a Python-based framework,
>> I'll repeat that there is no reason such a system should have X even
>> installed in order to serve web pages. Even on a lean, mean server
>> machine, CPython requires only a few extra libraries. Add tkinter, and
>> suddenly you have to install a LOT of things. If you plan to actually
>> use tkinter, this is fine. If not, you've just added a lot of stuff that
>> you don't need. This adds unnecessary overhead in several places (like
>> your package system's database).
> I can't disagree with any of this, except to say that none of this 
> justifies having a separate package for Tkinter. Naturally if you don't 
> have X, Tcl won't work, and if Tcl won't work, Tkinter won't work and 
> should give an import error. But that doesn't imply that X must be a 
> dependency for Python. It's a dependency for having Tkinter *work*, but 
> not for *installing* Tkinter as part of the standard library.
>
> Hell, even if you have X installed, and Tcl, and the Tkinter packages, 
> importing tkinter can still fail, if Python wasn't built with the right 
> magic incantations for it to recognise that Tcl is installed.
Then don't use a package system. The job of a package system is, that if
you install something, it install all dependencies that are needed to make
it work. And if, as the OP you thinks, python working, means tkinter working,
not installing tcl and not installing X, is not an option.

Your solution doesn't make sense in view of your earlier response where
you argue tkinster should be installed because it is part of the standard
combined with the advantage of having a standard library. But IMO a part
of that standard library not working, is just as harmful as part of that
standard library not being installed. From a user/programmer's point of
view the result is the same. It is unusable.




More information about the Python-list mailing list