How do I install tkinter for the default Python 2.7 on CentOS 7
NickName:Nimar Ask DateTime:2018-07-25T00:47:29

How do I install tkinter for the default Python 2.7 on CentOS 7

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

Answers
Vex - 2018-07-25T08:38:08

EDIT: Did not see it was for 2.7, you should check IUS community repo as they have python27-tkinter package",


More about “How do I install tkinter for the default Python 2.7 on CentOS 7” related questions

How do I install tkinter for the default Python 2.7 on CentOS 7

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....

Show Detail

How to Install Tkinter in Python3.6 Centos7 Offline

I'm trying to install Tkinter (since I get no module named '_tkinter' errors) on an offline Centos7 machine. Thus pip install / apt-get won't work. I have tkinter for python2.7 and tried copying ...

Show Detail

Tkinter found on Python 3 but not on Python2.7

I am on CentOs7. I installed tk, tk-devel, tkinter through yum. I can import tkinter in Python 3, but not in Python 2.7. Any ideas? Success in Python 3 (Anaconda): Python 3.6.3 |Anaconda custo...

Show Detail

Install idle-python2.7 under CentOS

I am looking to install an IDE for Python. I am working on a VM with a Python version of 2.7.5, and under CentOS7. I am trying to install it on the command line under my terminal. For now I only f...

Show Detail

How to install python-devel for 2.7 version after upgrade to python 2.7 on CentOS

CentOS 6.7 ships with python 2.6.6, I've upgrade to python 2.7.6 following the tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 After up...

Show Detail

How to install tkinter in python 3.6 in CentOS release 6.4

I have started to play with Python and I went directly to Python 3.6. I have two Python environments now in my system: Python 2..6.6 and Python 3.6 Python 2.6.6 is under: which python /usr/bin/

Show Detail

centos python2.7, ImportError: No module named _tkinter

centos python2.7,when I import Tkinter, it shows "import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter",and I find out many solutions( like

Show Detail

Install Tkinter on python 2.6 and 2.7

So we are trying to deploy a python module called Tkinter in a large multi-user environment under RHEL. It seems to be installed in python 2.6 but not 2.7. We tied yum install but it seems to only ...

Show Detail

Linux CentOS 7, how to set Python2.7 as default Python version?

I'm using a laptop running Linux CentOS 7. I installed Python2.7, and then I installed Anaconda, which installed Python3.5.2 I want my system to use Python2.7 as default, but if I type python from...

Show Detail

How to downgrade to python 2.7.5 and make it as default in CentOs7?

CentOS7 comes with python 2.7.5 and I followed https://myopswork.com/install-python-2-7-10-on-centos-rhel-75f90c5239a5 and installed python 2.7.10 to meet yugabyte db installation pre-requisites.

Show Detail