Skip to content

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

Closed as not planned

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)]

Activity

  1. added
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Nov 8, 2024
  2. added
    type-bugAn unexpected behavior, bug, or error
    and removed
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Nov 8, 2024
  3. changed the title [-]python 3.13: tkinter crash[/-] [+]3.13: cannot run `python -m tkinter` due to missing `init.tcl`[/+] on Nov 8, 2024
  4. added
    pendingThe issue will be closed if no feedback is provided
    on Nov 9, 2024
  5. terryjreedy commented on Nov 9, 2024

    @terryjreedy
    Member

    If you installed experimental no-gil build, known issue. If venv involved, though not apparant here, fix in 3.13.1. See #126549 closed yesterday and references therein. Unless this is a truly different issue, it should be closed.

  6. picnixz commented on Dec 1, 2024

    @picnixz
    Member

    Closing as a duplicate. If the issue persists, please open a new one. Thanks.

  7. removed
    pendingThe issue will be closed if no feedback is provided
    on Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions