Skip to content

tkinter.tix is broken on Linux - remove it? #723

@geofft

Description

@geofft

Tix is an old widget toolkit for Tk. Python had bindings for it as tkinter.tix, which were marked deprecated in Python 3.6 and removed in Python 3.13.

Our UNIX build tries to support it for Python <3.13, except on macOS, where as noted in the quirks doc it doesn't work. But it also doesn't seem to work for me on Linux:

$ DISPLAY=:1 uvx python3.9
Python 3.9.23 (main, Jul  8 2025, 20:58:46)
[Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter.tix
>>> t = tkinter.tix.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.local/share/uv/python/cpython-3.9.23-linux-x86_64-gnu/lib/python3.9/tkinter/tix.py", line 214, in __init__ 
    self.tk.eval('package require Tix')
_tkinter.TclError: couldn't load file "/home/ubuntu/.local/share/uv/python/cpython-3.9.23-linux-x86_64-gnu/lib/Tix8.4.3/libTix8.4.3.a": /home/ubuntu/.local/share/uv/python/cpython-3.9.23-linux-x86_64-gnu/lib/Tix8.4.3/libTix8.4.3.a: invalid ELF header

I made a guess that libTix might be statically linked somewhere and locally changed lib/Tix8.4.3/pkgIndex.tcl from [list load [file join $dir libTix8.4.3.a] Tix] to [list load {} Tix], but that gets me

>>> t = tkinter.tix.Tk()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/.local/share/uv/python/cpython-3.9.23-linux-x86_64-gnu/lib/python3.9/tkinter/tix.py", line 214, in __init__ 
    self.tk.eval('package require Tix')
_tkinter.TclError: package "Tix" isn't loaded statically

(I noticed this as part of thinking about how to switch libTcl and libTk to dynamic linking and wondering how libTix worked... the answer appears to be that it doesn't.)

Because nobody has raised an issue about needing tkinter.tix, it's deprecated, and it's unavailable on Mac, I propose to remove it instead of trying to fix this.

(I haven't tested whether it works on Windows. It might, and if so I don't plan to remove it.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions