Bug(s) in Python 3.1.1 Windows installation

John Machin sjmachin at lexicon.net
Thu Oct 29 05:27:02 CET 2009

On Oct 29, 11:06 am, "Alf P. Steinbach" <al... at start.no> wrote:
> (3) Tkinter not bundled, misleading & incomplete documentation.
> With the file associations in place (the installer managed to do that) running
> console programs works fine.
> However, running Tkinter based programs does *not* work:
> <code filename="ellipse.pyw">
> import Tkinter

What documentation are you reading? As you are running Python 3.1, you
might like to consider reading 3.1 documentation. Many things have
been changed from 2.X, including renaming unconventionally named
modules and packages. In particular see http://docs.python.org/3.1/library/tkinter.html
... in general, see the whatsnew docs that I pointed you at.

If you are trying to run 2.X code under 3.1, don't expect it to work
straight away. Find "2to3" in the docs.

> Checking I find that while there is a Tkinter folder there is no file
> [Tkinter.py] in this installation, i.e. the Tkinter module is not bundled with
> this distribution.

but the tkinter module is bundled

> That's bad news for any novice wanting to start learning the language: a main
> "battery" is missing! The documentation gives the impression that Tkinter can

Which documentation?

> just be used, and it could just be used with ActivePython. Here the novice has

ActivePython 2.X or 3.X?

> to figure out not only that it isn't there, but also how to get it!
> Checking <url:http://pypi.python.org/pypi/>, the package index, nope, no
> Tkinter there.

PyPI is for third-party modules and packages.

> Typing "tkinter" in the Firefox address bar leads to <url:http://wiki.python.org/moin/TkInter>, and it has a recipe for checking for
> Tkinter support/installation:
> <checking results>
> Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import _tkinter
>  >>> import Tkinter
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> ImportError: No module named Tkinter
>  >>>
> </checking results>
> The recipe now calls for adding path to directory with [Tkinter.py], but as
> mentioned no such file in this installation...
> Cheers,
> - Alf
> PS: This was not unexpected. It was exactly why I earlier didn't even look at
> CPython (umpteen bad experiences with *nix ports) but used ActivePython. I'm
> hopeful that I will find where Tkinter resides on the net, but hey, it should at
> least be documented, up front I mean (it's possibly mentioned somewhere, yes?).

Yes. You'll find that tkinter resides also on your hard disk (unless
you chose not to install it).

Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit
(Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.__file__

Didn't you do a search of your hard disk for "Tkinter"?

More information about the Python-list mailing list