This is the old SliTaz forum - Please use the main

Tkinter not configured for python
  • atalon1atalon1 March 2011
    I made a liveUSB of the cooking slitaz iso. I have installed python and TCL and when I try to run a python script (which perfectly runs on  ubuntu), I get an error:

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

    I found that it may append when python is installed before TCL/Tk (tkinter). I tried to resinstall python and python dev after TCL and TCL dev but I still have the problem.
    Can you help me to make it work?
  • Trixar_zaTrixar_za March 2011
    Tkinter and TCL/TK are not the same thing. Tkinter is a python module that gives a python programmer access to the TK library and it gets installed with python, not TCL/TK.

    Anyway, I checked and Tkinter does come with your cooking's python install. This means the problem is probably the script and how it's trying to use Tkinter. The reason it works with Ubuntu is because Ubuntu still ships with the 2.6.* series of Python because there were changes in 2.7 with syntax so that it's closer to Python 3000, which would make converting and upgrading easier. This has the nasty side effect of breaking scripts that was written for an older version of Python. Like you can see now.

    Maybe if you could provided the script, we can see if we can fix it. Alternatively, you could try installing an older copy of python from Stable @
  • atalon1atalon1 March 2011
    Thanks, I tried the 2.5 version python and it works fine for me, with PMW 1.3.1 installed as well.
    I will use scripts that I wrote some time ago and I do not want to change the code... it work, that enough at the moment for me.

    Thanks a lot, also for clarification of Tkinter and TCL/Tk.
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership


SliTaz Social