Using Thonny with Python 3.10

756 views
Skip to first unread message

Isaac Rabinovitch

unread,
Feb 20, 2022, 5:54:15 PM2/20/22
to thonny
Working my way through the latest Python Tutorial, I stumbled across Python features that don't exist in Thonny's Python 3.7. Of course, I could just switch to the 3.7 version of the tutorial, but I'd really rather work with Python 3.10. 

Thonny works fine with Python 3.8, the version that comes with Linux Mint. But if I install 3.10 via deadsnakes, I get this error:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/home/isaac/apps/thonny/lib/python3.7/site-packages/thonny/plugins/cpython/__init__.py", line 5, in <module>
    import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'


Am I stuck with 3.8?

Isaac Rabinovitch

unread,
Feb 20, 2022, 5:57:25 PM2/20/22
to thonny
Never mind. I hadn't googled enough.

sudo apt-get install python3.10-tk

Thonny is really impressive, BTW.
Reply all
Reply to author
Forward
0 new messages