Installation on Linux¶
These instructions are for installing Tktable yourself, with pip install pytktable. With
pip install "pytktable[binary]", you don’t need them: see With prebuilt Tktable (recommended).
Install Tktable¶
First, install tkinter (see the commands). Then, where the distribution has a Tktable package:
Distribution |
Command |
Tktable version |
|---|---|---|
Debian |
|
|
Ubuntu |
|
|
Linux Mint |
|
|
Kali Linux |
|
|
Gentoo |
|
|
Slackware |
the |
2.10.8 |
Fedora, RHEL and its rebuilds (CentOS, Rocky Linux, AlmaLinux), openSUSE, Alpine and Arch Linux
have no Tktable package that we know of: there, use the prebuilt Tktable
(With prebuilt Tktable (recommended)) or conda. perl-Tk-TableMatrix (Fedora,
Arch Linux, Manjaro) is a different table widget, for Perl/Tk, not Tktable.
Check the installation¶
python -m tktable
Tktable in a non-standard location¶
Set TKTABLE_LIBRARY for one command:
TKTABLE_LIBRARY=/usr/lib/Tktable2.10 python -m tktable
Or for the whole shell session:
export TKTABLE_LIBRARY=/usr/lib/Tktable2.10
Try the example without installing Tktable¶
On Linux with Docker, you can run the example in an Ubuntu container, which has Python, Tk and Tktable. Its window opens on your X11 desktop (or Wayland, through XWayland).
From the repository’s root, build the image:
docker build -f docker/Dockerfile.ubuntu -t tktable-test:ubuntu .
Allow local containers to open windows on your display:
xhost +local:
Run the example:
docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix tktable-test:ubuntu python -m examples.planets