I have installed tkinter
package but the default Python (which is version 2.7) on CentOS 7 still complains that this package doesn't exist.
sudo rpm --query centos-release
centos-release-7-5.1804.el7.centos.2.x86_64
sudo yum install tkinter
...
Package tkinter-2.7.5-69.el7_5.x86_64 already installed and latest version
python -m tkinter
/usr/bin/python: No module named tkinter
python
Python 2.7.5 (default, Jul 13 2018, 13:06:57)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
Copyright Notice:Content Author:「Nimar」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51503819/how-do-i-install-tkinter-for-the-default-python-2-7-on-centos-7