Tkinter missing dependency

Under Fedora 17, I did an import of Tkinter package but got this error in a python shell:

Traceback (most recent call last):
  File "slider-demo-1.py", line 1, in <module>
    from Tkinter import *
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk

I first install tkinter (i686) with yumex and it do not help, I then install tk-devel: no success. I finally installed another tkinter (x86_64) and then it solved the problem.

So, the solution is:

sudo yum install tkinter* tk-devel
Please follow and like us:
This entry was posted in Linux, Python and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *