I tried to use the matplotlib package via Pycharm IDE on windows 10. when I run this code:
from matplotlib import pyplot
I get the followin
On CentOS 7 and Python 3.4, the command is sudo yum install python34-tkinter
On Redhat 7.4 with Python 3.6, the command is sudo yum install rh-python36-python-tkinter
sudo apt-get install python3-tk
Then,
>> import tkinter # all fine
Edit:
For Windows, I think the problem is you didn't install complete Python package. Since Tkinter should be shipped with Python out of box. See: http://www.tkdocs.com/tutorial/install.html
I suggest install ipython, which provides powerful shell and necessary packages as well.
Since I'm using Python 3.7 on Ubuntu I had to use:
sudo apt-get install python3.7-tk
On Centos, the package names and commands are different. You'll need to do:
sudo yum install tkinter
To fix the problem.