IDLE can't import Tkinter. Your Python may not be configured for Tk IDLE can't import Tkinter. Your Python may not be configured for Tk tkinter tkinter

IDLE can't import Tkinter. Your Python may not be configured for Tk


On OSX, this can be resolved with macports by installing the python tkinter package for your python version. In my case, with python 2.7, I ran on the terminal:

sudo port install py27-tkinter

change the "27" to your python version number.


On Ubuntu:

sudo apt-get install idle

Choose one from

  • idle
  • idle3
  • idle-python2.6
  • idle-python2.7
  • idle-python3.1
  • idle-python3.2

for your python version.


The problem is caused by the version between python and idle not matching.U can check your python version by typing : pythonThen sudo aptget install the right idle version same with your python version