matplotlib error – no module named tkinter

For Linux

Debian based distros:

sudo apt-get install python3-tk

RPM based distros:

sudo yum install python3-tkinter

For windows:

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 . Good python distributions for Windows can be found by the companies Anaconda or ActiveState.

Test the python module

python -c "import tkinter"

p.s. I suggest installing ipython, which provides powerful shell and necessary packages as well.

Leave a Comment