deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

IDLE is broken with 3.9.5 #167

Closed taleinat closed 3 years ago

taleinat commented 3 years ago

description

IDLE fails to run, crashing with the following exception:

$ idle-python3.9 
Traceback (most recent call last):
  File "/usr/bin/idle-python3.9", line 3, in <module>
    from idlelib.pyshell import main
  File "/usr/lib/python3.9/idlelib/pyshell.py", line 53, in <module>
    from idlelib.editor import EditorWindow, fixwordbreaks
  File "/usr/lib/python3.9/idlelib/editor.py", line 19, in <module>
    from idlelib import configdialog
  File "/usr/lib/python3.9/idlelib/configdialog.py", line 26, in <module>
    from idlelib.config_key import GetKeysDialog
  File "/usr/lib/python3.9/idlelib/config_key.py", line 7, in <module>
    from tkinter.simpledialog import _setup_dialog
ImportError: cannot import name '_setup_dialog' from 'tkinter.simpledialog' (/usr/lib/python3.9/tkinter/simpledialog.py)

This appears to be caused by using the python3-tk package, which (for Ubuntu Focal at least) installs the tkinter stdlib package from Python 3.9.0, where the addition of _setup_dialog() is missing from tkinter.simpledialog.

os information

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

uname -a

Linux <REDACTED> 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 3 years ago

that's unfortunately :(

there's not really anything I can do about this though I've spoken with the debian maintainers and they're going to try not bundling multiple versions in the same package

I think you can use package pinning to prefer the non-deadsnakes python3.9 on focal and then you'll get 3.9.0 across the board which should work?

taleinat commented 3 years ago

Thanks for the very quick reply @asottile!

I think you can use package pinning to prefer the non-deadsnakes python3.9 on focal and then you'll get 3.9.0 across the board which should work?

Yes, that's a good solution!

IDLE has improved significantly since 3.9.0, so having the version from 3.9.5 is meaningful for me. Then again, I'm unusual in this regard, and I had no issues building Python 3.9.5 from source.

asottile commented 3 years ago

you'll probably have better luck with the 3.10b1 IDLE? that one should have its own copy of tkinter and won't depend on the ubuntu one