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
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
- The "ModuleNotFoundError: No module named 'ttkbootstrap' "error,
- "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.
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.
- A Linux PC (Ubuntu, Xbuntu, Kubuntu ,Linux Mint, Zorin OS, pop! Os)
- Internet Connection
- Text Editor
Main Issues in Installing Ttkbootstrap
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.
you will bet an error saying that "error:externally-managed-environment this environment is externally managed " as shown below

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
The main steps needed for installing ttkbootstrap on Linux are
- Install tkinter GUI Library first.
- 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.
- Check the tkinter installation.
- Create a Venv virtual environment
- Activate the Venv Virtual Environment
- Install ttkbootstrap locally inside the venv directory.
Install Tkinter GUI Library on Linux
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

Test Tkinter Installation on Linux
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.
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
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.

sometimes you need to install ensure pip ,just copy the command shown above and run it.
Install Ttkbootstrap GUI Library on Linux
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

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

Test and Run Ttkbootstrap GUI Programs on Linux
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.
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

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