Learn to Install Ttkbootstrap GUI Library on Debian Based Linux Systems Like Ubuntu,Linux Mint,Zorin OS

by xanthium-enterprises in Circuits > Linux

21 Views, 0 Favorites, 0 Comments

Learn to Install Ttkbootstrap GUI Library on Debian Based Linux Systems Like Ubuntu,Linux Mint,Zorin OS

Installing ttkbootstrap (tkinter) Python GUI package on Debian Linux Systems Tutorial

In this instructable, You will learn how to install ttkbootstrap GUI library on a Debian based Linux systems like Ubuntu, Xbuntu, Kubuntu ,Linux Mint, Zorin OS, pop! Os etc.

With Recent changes in Python Development standard's, most Debian based Linux OS's do not allow you to install python packages system wide. They all forces the developer to create local installation of Python packages like ttkbootstrap using a Virtual environment like venv.

Now here we will teach the user all the steps required to install the ttkbootstrap GUI library on a Ubuntu 25.10 Linux system from scratch So the user can build beautiful Python GUI Programs.

We will also solve commonly encountered errors like

  1. The "ModuleNotFoundError: No module named 'ttkbootstrap' "error,
  2. "error:externally-managed-environment this environment is externally managed ".Error

while installing ttkbootstrap library on Linux Systems.


If you are new to ttkbootstrap library you can check our tutorial below.

  1. Building Beautiful GUI Applications using ttkbootstrap, tkinter and Python for Beginners


Supplies

This is a software Project ,so you don't need any thing as almost everything you need is provided by the Ubuntu Linux OS.

  1. A Linux PC (Ubuntu, Xbuntu, Kubuntu ,Linux Mint, Zorin OS, pop! Os)
  2. Internet Connection
  3. Text Editor

Main Issues in Installing Ttkbootstrap

ttkbootstrap.jpg
ttkbootstrap-error-message.png

What is ttkbootstrap

ttkbootstrap is a theme extension built specifically for Tkinter that allows developers to enhance their applications with sleek, modern, flat-style themes inspired by Bootstrap.It includes a rich set of beautifully designed light and dark themes, predefined widget styles, and additional GUI components such as Meter, DateEntry, and Floodgauge.


Main Issue in installing ttkbootstrap on Linux


If you got to the ttkbootstrap website and try to install the ttkbootstrap library using pip installer as shown in the website.

Please note that you need to install pip installer first even to run this command.

python -m pip install ttkbootstrap

you will bet an error saying that "error:externally-managed-environment this environment is externally managed " as shown below

How to install ttkbootstrap theme extension for tkinter on Ubuntu Linux System for beginners

This because the Python installation in most Debian based Linux systems do not allow pip to install system wide Python Libraries to prevent the original python installation from getting cluttered.

so only way to install the ttkbootstrap library is used the system package manager like apt or apt-get or to install ttkbootstrap libraries locally using VENV virtual environment.

Since there are no apt based packages we will be installing ttkbootstrap locally using Python VENV virtual environment on Ubuntu Linux.




Steps for Installing Ttkbootstrap Library

steps.jpg

The main steps needed for installing ttkbootstrap on Linux are

  1. Install tkinter GUI Library first.
  2. Ubuntu doesn't come with a tkinter GUI Library by default.You will have to install tkinter seperately using apt. since ttkbootstrap is a theme extension for tkinter,installation of tkinter is a must.
  3. Check the tkinter installation.
  4. Create a Venv virtual environment
  5. Activate the Venv Virtual Environment
  6. Install ttkbootstrap locally inside the venv directory.

Install Tkinter GUI Library on Linux

tkinter.png
install-python-tk-linux.png

Tkinter is Python’s standard GUI (Graphical User Interface) library. It provides the basic tools needed to create desktop applications, such as windows, buttons, labels, text fields, and menus.

Tkinter is included with Python on Windows installations of cPython but on Ubuntu you will have to install separately using apt.


Relationship between tkinter and ttkbootstrap

Tkinter is easy to learn, and well-suited for building simple to moderately complex applications. However, its default appearance is fairly basic and can look outdated.

ttkbootstrap builds on top of Tkinter (specifically its themed widget set called ttk). It does not replace Tkinter,instead, it enhances it. ttkbootstrap adds modern, Bootstrap inspired themes, improved widget styling, and additional widgets that are not available in standard Tkinter.


Installing tkinter on Ubuntu


The first thing you need to do is install the Tkinter GUI library. You can do this using the apt-get package manager, which will install Tkinter for your entire Ubuntu system.

being installed system wide means that tkinter is available outside your venv environment.

You can use the below commands to install tkinter

sudo apt-get update
sudo apt-get install python3-tk



steps to install ttkbootstrap theme extension for tkinter on Linux Mint System for beginners

Test Tkinter Installation on Linux

tkinter-test.png

Once the tkinter installtion is complete. You can check it by writing a small script in your Python command prompt.

You can start the Python3 prompt and type the following code.

import tkinter
tkinter._test()

this will create a simple window ,if the installation is complete and ok.


here tkinter._test() line runs a built-in test function that comes with Tkinter and Confirms that Tkinter is installed and working correctly

Create a VENV Virtual Environment

ttkbootstrap-venv-create-linux.png
vlcsnap-2026-01-06-21h22m59s759.png

Next, you need to create a virtual environment so you can install the ttkbootstrap library locally. A virtual environment keeps your project’s packages separate from the rest of the system.

If you are new to virtual environments on Linux, you can follow this tutorial for guidance.

First, create a directory where you will run your Python code. Inside that directory, create a virtual environment using venv.

as shown below.

steps to install ttkbootstrap on Linux Mint System for beginners

sometimes you need to install ensure pip ,just copy the command shown above and run it.


Install Ttkbootstrap GUI Library on Linux

show-venv.png
install-ttkbootstrap-linux-pip.png

Now that we have successfully created a venv virtual environment inside the directory.

We are going to install ttkbootstrap library inside it locally. The ttkbootstrap files will be inside the lib directory inside your venv virtual environment folder.

Now before installing ttkbootstrap, you need to activate the virtual environment using activation scripts.

you can use the source command

source venv/bin/activate


steps to install ttkbootstrap on zorin os System for beginners


Once activated ,you can just install ttkbootstrap using pip command as shown below.

pip install ttkbootstrap





steps to install ttkbootstrap on debian kubuntu linux System for beginners

Test and Run Ttkbootstrap GUI Programs on Linux

running.png

Once the installation is complete ,you can test it by running a simple ttkbootstrap code on your ubuntu linux system.

Here is a sample code to create a simple ttkbootstrap window.

import ttkbootstrap
root = ttkbootstrap.Window()
root.mainloop()

If you are not sure what the code means do check our complete ttkbootstrap tutorial here

Save the file as ttkboot.py and then run the code by

python3 ttkboot.py


steps to install ttkbootstrap on debian kubuntu linux System for beginners


Please make sure that the code is running after the VENV virtual environment is activated .