Skip to content

3.13: cannot run python -m tkinter due to missing init.tcl #126592

@ahmadkakarr

Description

@ahmadkakarr

Bug report

What happened?

python -m tkinter
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\ahmad\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\Lib\tkinter\__main__.py", line 7, in <module> 
    main()
    ~~~~^^
  File "C:\Users\ahmad\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\Lib\tkinter\__init__.py", line 4957, in _test 
    root = Tk()
  File "C:\Users\ahmad\AppData\Roaming\uv\python\cpython-3.13.0-windows-x86_64-none\Lib\tkinter\__init__.py", line 2459, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Users/ahmad/AppData/Roaming/uv/python/cpython-3.13.0-windows-x86_64-none/lib/tcl8.6 
    C:/Users/ahmad/AppData/Roaming/uv/python/lib/tcl8.6
    C:/Users/ahmad/AppData/Roaming/uv/lib/tcl8.6
    C:/Users/ahmad/AppData/Roaming/uv/python/library
    C:/Users/ahmad/AppData/Roaming/uv/library
    C:/Users/ahmad/AppData/Roaming/uv/tcl8.6.12/library
    C:/Users/ahmad/AppData/Roaming/tcl8.6.12/library

This probably means that Tcl wasn't installed properly.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Output from running 'python -VV' on the command line:

Python 3.13.0 (main, Oct 16 2024, 00:33:24) [MSC v.1929 64 bit (AMD64)]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions