I need to install python3-tk in order to use matplotlib.
I have tried:
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$ sudo yum install python3-tk
[sudo] password for lpuggini:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.clouvider.net
* epel: epel.check-update.co.uk
* extras: mirror.sov.uk.goscomb.net
* updates: mirrors.clouvider.net
No package python3-tk available.
Error: Nothing to do
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$
but it is not working.
How can I fix it?
EDIT: Installing from pip does not work:
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$ pip install pygtk
Collecting pygtk
Using cached pygtk-2.24.0.tar.bz2
Complete output from command python setup.py egg_info:
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nzjsuhx3/pygtk/
(python_3.4_numerical) [lpuggini@machinelearn-1 ~]$
Tkinter is the de facto way in Python to create Graphical User Interfaces (GUIs). Installing Tkinter on Windows is as simple as installing Python 3. x since Tkinter is included in the Python 3 core.
Tkinter can be installed using pip.
Tkinter is widely available for all operating systems. It is pre-install in the Python. To work with the Tkinter, we must install the Python.
tkinter is available in coreos as tkinter
package. You can install it with
sudo yum install tkinter
Once it is done, you can import and use it as usual.
>>> import tkinter
>>> tkinter._test()
For Python 3, you can install it with
sudo yum install python3-tkinter
As some users mentioned, it is available as python36u-tkinter
or python34-tkinter
depending on OS.
sudo yum install python34-tkinter
sudo yum install python36u-tkinter
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