Python 3.11.0 installation and Tkinter does not work

Thomas Passin list1 at tompassin.net
Mon Nov 21 16:41:57 EST 2022


On 11/21/2022 1:24 PM, Stefan Ram wrote:
> darkstone at o2online.de writes:
>>>>> import _tkinter
> 
>    I don't know why you get this error message. Here, I do not
>    get an error message from that line. However, the normal way
>    to use tkinter, as far as I know, is without the underscore!

You can import both tkinter and _tkinter, though I'm not sure why you 
would do the latter for any normal programming.

>    I think it might be best if you make sure that a recent
>    Visual C++ Redistributable Runtime from Microsoft®
>    is installed before you install Python.

That's a worthwhile thought.

>    If you have no such Runtime, I have no idea how to proceed!
>    Maybe uninstall Python, install the Runtime, and then install
>    Python again?

python.org says:

"Note that Python 3.11.0 cannot be used on Windows 7 or earlier"

But maybe there's something about their compilation settings or runtime 
support versions that doesn't work with the OP's version of Python 8.1.

Or, since Python itself seems to be running, maybe the way the tkinter 
binary was compiled isn't compatible even though Python 3.11 itself is. 
Maybe this is a bug waiting to be filed...

I would try installing a lower version, maybe an older version of Python 
3.10, and seeing if that works.

>    If you have chosen any unusual settings during the installation
>    of Python, it might help to try an installation with the suggested
>    settings.
> 
>    I am trying to learn tkinter myself and I am very surprised
>    how well it offers exactly what I am looking for! I hope they
>    never will remove tkinter from the standard distribution!
> 
> 



More information about the Python-list mailing list