Installation on Linux and macOS¶
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 tkinter and Tktable¶
On Debian and Ubuntu:
sudo apt install python3-tk tk-table
Fedora has no Tktable package in its current releases (e.g. Fedora 45).
On macOS, with MacPorts:
sudo port install 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
On macOS this needs an X server such as XQuartz, and is untested.