Bug report
Bug description:
Bug description
On Windows 10, tkinter cannot initialize when the official Python 3.14.7
installation is located under a user-profile path containing a space.
Python was installed using the official 64-bit installer with the default
per-user installation options. The issue persisted after completely
uninstalling and reinstalling Python.
The Tcl/Tk archives are present:
tcl\libtcl9.0.4.zip
tcl\libtk9.0.4.zip
Running the installation normally fails:
$python = "$env:LOCALAPPDATA\Programs\Python\Python314\python.exe"
& $python -m tkinter
The result is:
_tkinter.TclError: Cannot find a usable init.tcl in the following directories:
<redacted user profile>/AppData/Local/Programs/Python/Python314/lib/tcl9.0
...
This probably means that Tcl wasn't installed properly.
However, mapping the exact same Python installation to a drive letter makes
Tkinter work immediately:
subst T: "$env:LOCALAPPDATA\Programs\Python\Python314"
T:\python.exe -m tkinter
subst T: /d
The Tk demonstration window opens successfully through T:\python.exe.
No Python or Tcl/Tk files are copied or changed between the two tests. The only
difference is whether the same installation is accessed through its original
path, which contains a space, or through a drive-letter path without spaces.
A minimal program produces the same result:
import tkinter as tk
root = tk.Tk()
root.destroy()
Expected behavior
tkinter should initialize from the default per-user installation location
even when the Windows account/profile name contains a space.
Actual behavior
tkinter reports that it cannot find a usable init.tcl. Accessing the same
installation through a drive-letter mapping without spaces resolves the
failure.
Reproduction steps
-
Use a Windows account whose user-profile directory contains a space.
-
Install official Python 3.14.7 64-bit using the default per-user options.
-
Run:
& "$env:LOCALAPPDATA\Programs\Python\Python314\python.exe" -m tkinter
-
Observe the Cannot find a usable init.tcl error.
-
Run:
subst T: "$env:LOCALAPPDATA\Programs\Python\Python314"
T:\python.exe -m tkinter
subst T: /d
-
Observe that Tkinter now starts successfully.
Python version
Python 3.14.7
tags/v3.14.7:823f032
MSC v.1944 64 bit (AMD64)
Operating system
Windows 10 10.0.19045
64-bit
Additional checks
The installed archives exist and are not empty:
libtcl9.0.4.zip 1,121,107 bytes
libtk9.0.4.zip 297,208 bytes
The problem remained after:
- Uninstalling Python 3.14.7
- Reinstalling it with the official installer
- Using the default installation options
- Confirming that the Tcl/Tk component is registered as installed
This appears related to Tcl/Tk 9 ZIP-library discovery or mounting when the
Python installation path contains a space.
Related issues checked
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Bug report
Bug description:
Bug description
On Windows 10,
tkintercannot initialize when the official Python 3.14.7installation is located under a user-profile path containing a space.
Python was installed using the official 64-bit installer with the default
per-user installation options. The issue persisted after completely
uninstalling and reinstalling Python.
The Tcl/Tk archives are present:
tcl\libtcl9.0.4.ziptcl\libtk9.0.4.zipRunning the installation normally fails:
The result is:
However, mapping the exact same Python installation to a drive letter makes
Tkinter work immediately:
The Tk demonstration window opens successfully through
T:\python.exe.No Python or Tcl/Tk files are copied or changed between the two tests. The only
difference is whether the same installation is accessed through its original
path, which contains a space, or through a drive-letter path without spaces.
A minimal program produces the same result:
Expected behavior
tkintershould initialize from the default per-user installation locationeven when the Windows account/profile name contains a space.
Actual behavior
tkinterreports that it cannot find a usableinit.tcl. Accessing the sameinstallation through a drive-letter mapping without spaces resolves the
failure.
Reproduction steps
Use a Windows account whose user-profile directory contains a space.
Install official Python 3.14.7 64-bit using the default per-user options.
Run:
Observe the
Cannot find a usable init.tclerror.Run:
Observe that Tkinter now starts successfully.
Python version
Operating system
Additional checks
The installed archives exist and are not empty:
The problem remained after:
This appears related to Tcl/Tk 9 ZIP-library discovery or mounting when the
Python installation path contains a space.
Related issues checked
and a different interpreter/path scenario. It does not reproduce this
Python 3.14.7 ZIP-mounting failure or the successful
substcomparison.python -m tkinterdue to missinginit.tcl#126592 concerns a Python 3.13 runtime installed byuv, notthe official Python 3.14.7 Windows installer.
Tcl/Tk layout. In that report, ordinary Python runs Tkinter successfully;
here, ordinary official CPython itself fails until its path has no spaces.
CPython versions tested on:
3.14
Operating systems tested on:
Windows