How To Install python2-tkinter on Rocky Linux 8

In this tutorial we learn how to install python2-tkinter on Rocky Linux 8. python2-tkinter is A graphical user interface for the Python 2 scripting language

Introduction

In this tutorial we learn how to install python2-tkinter on Rocky Linux 8.

What is python2-tkinter

The Tkinter (Tk interface) program is an graphical user interface for the Python 2 scripting language. You should install the python2tkinter package if you’d like to use a graphical user interface for Python 2 programming.

We can use yum or dnf to install python2-tkinter on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python2-tkinter.

Install python2-tkinter on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python2-tkinter using dnf by running the following command:

sudo dnf -y install python2-tkinter

Install python2-tkinter on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python2-tkinter using yum by running the following command:

sudo yum -y install python2-tkinter

How To Uninstall python2-tkinter on Rocky Linux 8

To uninstall only the python2-tkinter package we can use the following command:

sudo dnf remove python2-tkinter

python2-tkinter Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/5a
/usr/lib/.build-id/5a/7c9403cedfa50bebae1c0ef243a4325b317d89
/usr/lib64/python2.7/lib-dynload/_tkinter.so
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/lib-tk/Canvas.py
/usr/lib64/python2.7/lib-tk/Canvas.pyc
/usr/lib64/python2.7/lib-tk/Canvas.pyo
/usr/lib64/python2.7/lib-tk/Dialog.py
/usr/lib64/python2.7/lib-tk/Dialog.pyc
/usr/lib64/python2.7/lib-tk/Dialog.pyo
/usr/lib64/python2.7/lib-tk/FileDialog.py
/usr/lib64/python2.7/lib-tk/FileDialog.pyc
/usr/lib64/python2.7/lib-tk/FileDialog.pyo
/usr/lib64/python2.7/lib-tk/FixTk.py
/usr/lib64/python2.7/lib-tk/FixTk.pyc
/usr/lib64/python2.7/lib-tk/FixTk.pyo
/usr/lib64/python2.7/lib-tk/ScrolledText.py
/usr/lib64/python2.7/lib-tk/ScrolledText.pyc
/usr/lib64/python2.7/lib-tk/ScrolledText.pyo
/usr/lib64/python2.7/lib-tk/SimpleDialog.py
/usr/lib64/python2.7/lib-tk/SimpleDialog.pyc
/usr/lib64/python2.7/lib-tk/SimpleDialog.pyo
/usr/lib64/python2.7/lib-tk/Tix.py
/usr/lib64/python2.7/lib-tk/Tix.pyc
/usr/lib64/python2.7/lib-tk/Tix.pyo
/usr/lib64/python2.7/lib-tk/Tkconstants.py
/usr/lib64/python2.7/lib-tk/Tkconstants.pyc
/usr/lib64/python2.7/lib-tk/Tkconstants.pyo
/usr/lib64/python2.7/lib-tk/Tkdnd.py
/usr/lib64/python2.7/lib-tk/Tkdnd.pyc
/usr/lib64/python2.7/lib-tk/Tkdnd.pyo
/usr/lib64/python2.7/lib-tk/Tkinter.py
/usr/lib64/python2.7/lib-tk/Tkinter.pyc
/usr/lib64/python2.7/lib-tk/Tkinter.pyo
/usr/lib64/python2.7/lib-tk/test
/usr/lib64/python2.7/lib-tk/test/README
/usr/lib64/python2.7/lib-tk/test/runtktests.py
/usr/lib64/python2.7/lib-tk/test/runtktests.pyc
/usr/lib64/python2.7/lib-tk/test/runtktests.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter
/usr/lib64/python2.7/lib-tk/test/test_tkinter/__init__.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/__init__.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/__init__.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_font.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_font.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_font.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_geometry_managers.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_geometry_managers.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_geometry_managers.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_images.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_loadtk.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_loadtk.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_loadtk.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_misc.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_misc.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_misc.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_text.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_text.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_text.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_variables.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_variables.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_variables.pyo
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_widgets.py
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_widgets.pyc
/usr/lib64/python2.7/lib-tk/test/test_tkinter/test_widgets.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk
/usr/lib64/python2.7/lib-tk/test/test_ttk/__init__.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/__init__.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/__init__.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk/support.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/support.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/support.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_extensions.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_functions.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_functions.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_functions.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_style.pyo
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.py
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyc
/usr/lib64/python2.7/lib-tk/test/test_ttk/test_widgets.pyo
/usr/lib64/python2.7/lib-tk/test/widget_tests.py
/usr/lib64/python2.7/lib-tk/test/widget_tests.pyc
/usr/lib64/python2.7/lib-tk/test/widget_tests.pyo
/usr/lib64/python2.7/lib-tk/tkColorChooser.py
/usr/lib64/python2.7/lib-tk/tkColorChooser.pyc
/usr/lib64/python2.7/lib-tk/tkColorChooser.pyo
/usr/lib64/python2.7/lib-tk/tkCommonDialog.py
/usr/lib64/python2.7/lib-tk/tkCommonDialog.pyc
/usr/lib64/python2.7/lib-tk/tkCommonDialog.pyo
/usr/lib64/python2.7/lib-tk/tkFileDialog.py
/usr/lib64/python2.7/lib-tk/tkFileDialog.pyc
/usr/lib64/python2.7/lib-tk/tkFileDialog.pyo
/usr/lib64/python2.7/lib-tk/tkFont.py
/usr/lib64/python2.7/lib-tk/tkFont.pyc
/usr/lib64/python2.7/lib-tk/tkFont.pyo
/usr/lib64/python2.7/lib-tk/tkMessageBox.py
/usr/lib64/python2.7/lib-tk/tkMessageBox.pyc
/usr/lib64/python2.7/lib-tk/tkMessageBox.pyo
/usr/lib64/python2.7/lib-tk/tkSimpleDialog.py
/usr/lib64/python2.7/lib-tk/tkSimpleDialog.pyc
/usr/lib64/python2.7/lib-tk/tkSimpleDialog.pyo
/usr/lib64/python2.7/lib-tk/ttk.py
/usr/lib64/python2.7/lib-tk/ttk.pyc
/usr/lib64/python2.7/lib-tk/ttk.pyo
/usr/lib64/python2.7/lib-tk/turtle.py
/usr/lib64/python2.7/lib-tk/turtle.pyc
/usr/lib64/python2.7/lib-tk/turtle.pyo

References

Summary

In this tutorial we learn how to install python2-tkinter on Rocky Linux 8 using yum and dnf.