-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Tkinter import sometimes fails in 3.13.0 #128188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please add more details. What is the error? what are you trying to do? what is missing exactly? which operating system are you using? |
Sorry, clicked enter too early, post was edited to the intended content. |
My question remains: what is the exact issue? when you say "cannot import tkinter", is it just |
As mentioned here: #125235 The tkinter library was improperly packaged or something alike on 3.13.0. For me, it also fails when importing tkinter regularly in a free threaded environment. I get no error message, python just silently quits when i try importing tkinter like this: |
Have you tried downloading 3.13.1 instead of 3.13.0 (https://www.python.org/downloads/release/python-3131/)? if there's a bug in a previous version, we don't re-upload a corrected version. |
Yes I did, but I am having trouble installing other 3rd party modules like rawpy and opencv-python because there are either no compatible versions yet, or deprecated functions in use like ImpImporter from pkgutils in the case of opencv-python |
I'm afraid we can't do anything. We may perhaps try to see if we can include it in 3.13.0 and republish it but this is left to the RM @Yhg1s. I think this needs to be closed as The best shot for you is to use 3.12.X instead. |
Yes, there's nothing we can do for 3.13.0. The fix is in 3.13.1. If something is stopping you from using 3.13.1 instead of 3.13.0, that's a separate issue that should be looked at (but that wouldn't change the fact that we cannot retroactively fix 3.13.0.) |
Ok, but it is still not entirely clear to me why the 3.13.0 version cant be overridden. It wouldn't really introduce new functionality or fix a real bug, which is of course supposed to go into a new patch like 3.13.1, but just an error in the packaging process. I don't see any downsides in simply changing the file. |
I changed the title because it was wrong. Tkinter was present in the 3.13.0 release. It worked fine with a default install and usage, but not in other situations. This was reported and as far as we know fixed in #125235. 3.13 is the most recent version of Python. 3.13.0 was the first release thereof. Each release represents a tagged version our github git repository. The general policy on PyPI is to increment release numbers for each new release, and we follow that. The fix for this issue was a one-word replacement in _tkinter.c. The 3.13.1 release contains this patch; it is the replacement for 3.13.0. The reasons to not use a bugfix release/replacement are for historical research or because a previous release works and one worries or knows that it will break something along with the fixes. Unreported issues with 3rd party packages should be referred to their maintainers. |
For the record, tkinter didn't work for me on 3.13.0 at all. |
Tkinter does work for a significant majority of users. We can't replace the 3.13.0 version with a new release with the same version number because it would create unacceptable confusion as to which 3.13.0 someone has. The fixed release is 3.13.1. Use 3.13.1. |
Please read my comment carefully:
Please answer all my concerns, not just the low-hanging-fruit |
@noblockhit Enough. Reread existing answers if you do not understand.
|
@terryjreedy I'd be greatly pleased if you could explain how you got tkinter to work on your machine using 3.13.0. |
The same as usual for about 20 years. I went to the 3.13.0 release page and downloaded the Windows 64 bit installer. I ran it, making sure that '[x] install tkinter and IDLE' was checked. (I believe I also checked '[x] all users', but I hope that this is not relevant). I ran IDLE and it worked. |
I did the same but python silently quits after importing tkinter |
The failiure of the tkinter import on 3.13.0 is still undocumented / not mentioned in the patch notes of 3.13.1 or even better: the download option here:
https://www.python.org/downloads/#:~:text=Release%20Notes-,Python%203.13.0,-Oct.%207%2C%202024
should be repackaged, so that tkinter actuall works.
The text was updated successfully, but these errors were encountered: