I'm currently experimenting with different Linux distributions and I'm trying to get some of my apps to run on the newest Tails distro. For that I need the tkinter library for Python3.
Sadly, importing tkinter in python3 doesn't work and trying to install it via
sudo apt-get install python3-tk
gives the following result:
Reading package lists... Done
Building dependecy tree
Reading state information... Done
Package python3-tk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: package 'python3-tk' has no installation candidate
I'd really appreciate any advice that would help me to either install tkinter or at least run my app (maybe by including the tkinter lib in my project, somehow?)
The simplest method to install Tkinter in a Windows environment is to download and install ActivePython 3.8 from here. Alternatively, you can create and activate a Conda environment with Python 3.7 or greater that is integrated with the latest version of Tkinter.
Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications. Tkinter provides a powerful object-oriented interface to the Tk GUI toolkit. Creating a GUI application using Tkinter is an easy task.
Tkinter comes pre-installed with the Python installer binaries for Mac OS X and the Windows platform. So if you install Python from the official binaries for Mac OS X or Windows platform, you are good to go with Tkinter. For Debian versions of Linux you have to install it manually by using the following commands.
Packages for Tkinter are available in the repositories of most distributions. In Ubuntu you can install either from the command line or via "Software Center".
Try typing these :
sudo apt-get update
sudo apt-get install python3-tk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With