#3993·Nuitka

tk-inter cannot detect zipped Tcl/Tk libraries in official Windows Python 3.14.7

Author: daddunCreated Aug 8, 2026Updated Sep 8, 2026
Labelsbugexcellent_report

Bug Description

On Windows with the official CPython 3.14.7 x86 installer, Tcl/Tk script libraries are shipped as libtcl9.0.4.zip and libtk9.0.4.zip. The tk-inter plugin only searches for unpacked directories containing init.tcl and dialog.tcl, so standalone compilation fails with Could not find Tcl.

This reproduces with stable Nuitka 4.1.3 and with the current develop branch (4.2rc3, commit fab23b052dae7e183897ab3d0769cf9ade6a7227).

I searched existing issues. #3884 is related to Tcl 9 selection on Linux, but this report is specifically about the zipped Tcl/Tk layout of the official Windows CPython 3.14.7 distribution.

️ Environment

1. Nuitka Version, Python Version, OS, and Platform

Current develop:

4.2rc3
Update status: newer than stable release '4.1.3'.
Commercial: None
Python: 3.14.7 (tags/v3.14.7:823f032, Aug  5 2026, 10:40:08) [MSC v.1944 32 bit (Intel)]
Flavor: CPython Official
GIL: yes
Executable: ~\AppData\Local\Programs\Python\Python314-32\python.exe
OS: Windows
Arch: x86
WindowsRelease: 10
Version C compiler: cl (cl 14.5).

Stable Nuitka 4.1.3 produces the same fatal error.

2. How Nuitka and Python were Installed

  • Python 3.14.7 x86: official CPython Windows installer
  • Nuitka 4.1.3: pip
  • Nuitka develop: shallow clone of Nuitka/Nuitka, placed first on PYTHONPATH
  • No virtual environment was used for this reproduction

3. Relevant PyPI Packages and Versions

No third-party runtime packages are required. The reproducer only imports the standard-library tkinter package.

️ To Reproduce

1. "Hello World" Test

The following compiles successfully in standalone mode with the same Nuitka develop checkout and compiler:

python
print("hello world")

2. Short, Self-Contained, Correct, Eligible (SSCCE) Example

python
# nuitka-project: --enable-plugin=tk-inter
import tkinter

print(tkinter.TclVersion)

Running it with standard Python succeeds and prints:

9.0

3. Nuitka Command Line Options

powershell
python -m nuitka --standalone tk_probe.py

The relevant Python installation layout is:

<Python prefix>\tcl\
    libtcl9.0.4.zip
    libtk9.0.4.zip
    tk9.0\

These expected unpacked files do not exist:

<Python prefix>\tcl\tcl9.0\init.tcl
<Python prefix>\tcl\tk9.0\dialog.tcl

The archives contain:

libtcl9.0.4.zip -> tcl_library/init.tcl
libtk9.0.4.zip  -> tk_library/dialog.tcl

Expected Behavior

The tk-inter plugin should detect the zipped Tcl/Tk layout used by this official CPython build, include the contained runtime files, and complete standalone compilation.

Actual Behavior & Output

Stable 4.1.3 and develop 4.2rc3 both fail during plugin data-file discovery:

FATAL: tk-inter: Could not find Tcl, you might need to use '--tcl-library-dir' and if that works, report a bug so it can be added to Nuitka.
Nuitka-Reports: Compilation crash report written to file 'nuitka-crash-report.xml'.

The current develop implementation still checks candidate directories using os.path.join(tcl_library_dir, "init.tcl"), so neither zip archive is considered.

As a diagnostic workaround, I manually extracted both archives and supplied:

--tcl-library-dir=<temporary directory>\tcl_library
--tk-library-dir=<temporary directory>\tk_library

That standalone compilation succeeded, and the plugin reported including 839 Tcl data files and 90 Tk data files. This confirms that archive discovery/extraction is the missing step rather than a compiler problem.

↩️ Regression

No confirmed last-known-working Nuitka version for this exact CPython 3.14.7 archive layout.