I have the python3-tkinter installed, as shown below:
$ sudo yum install python3-tkinter
[sudo] password for abigail:
Loaded plugins: fastestmirror, langpacks
L
You have both IUS and nux-desktop repos enabled. It appears that nux-desktop has a package named python3 of version 3.3.2, with the related python3-tkinter package. IUS on the other hand has packages for python34u (3.4.6), python35u (3.5.3), and python36u (3.6.0), all with corresponding tkinter packages. So if you want to be able to import tkinter
inside a python3.5 REPL, then run:
yum install python35u-tkinter
For Python 3.6.x
on CentOS 7.4
, install:
$ sudo yum install python36-tkinter
You need to have EPEL
repository configured.
For centos 7.6, python 3.4.9, resolve my issue by:
yum install python34-tkinter.x86_64
For tkinter installation for Python3.5:
yum -y install tkinter tcl-devel tk-devel
vim ......./Python3.5.#/Modules/Setup.dist
, remove the comment symbol before the following lines:
_tkinter _tkinter.c tkappinit.c -
-L/usr/local/lib \
-I/usr/local/include \
-ltk8.5 -ltcl8.5 \ #defualt as 8.2
-lX11
configure and install
./configure
make
make install