Skip to content

3.14 only error with tkinter - "Can't find a usable init.tcl", "This probably means that Tcl wasn't installed properly." #913

@jack-mcivor

Description

@jack-mcivor

Summary

The following is throwing an error for me (Ubuntu 24.04.2 on WSL2) on Python 3.14.0 & Python 3.14.1

uv run --isolated -p 3.14.1 python -c 'import tkinter as tk; tk.Tk()'

output:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import tkinter as tk; tk.Tk()
                          ~~~~~^^
  File "/home/jack/.local/share/uv/python/cpython-3.14.1-linux-x86_64-gnu/lib/python3.14/tkinter/__init__.py", line 2479, 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: 
    /tools/deps/lib/tcl8.6 /home/jack/.cache/uv/builds-v0/.tmpdenXkW/lib/tcl8.6 /home/jack/.cache/uv/builds-v0/lib/tcl8.6 /home/jack/.cache/uv/builds-v0/.tmpdenXkW/library /home/jack/.cache/uv/builds-v0/library /home/jack/.cache/uv/builds-v0/tcl8.6.14/library /home/jack/.cache/uv/tcl8.6.14/library



This probably means that Tcl wasn't installed properly.

By contrast, other Python versions work without issue

uv run --isolated -p 3.13.10 python -c 'import tkinter as tk; tk.Tk()'

I don't know anything about Tcl or tkinter but originally encountered this when trying to do something simple in matplotlib - eg.

uv run --isolated -p 3.14 -w matplotlib python -c 'import matplotlib.pyplot as plt; plt.subplots()' 

Platform

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 GNU/Linux (Ubuntu 24.04.2 on WSL)

Version

uv 0.9.15

Python version

Python 3.14.1 (cpython-3.14.1-linux-x86_64-gnu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions