Get error "ImportError: No module named _tkinter"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sebastian Stelzer

    Get error "ImportError: No module named _tkinter"

    Hi,

    I'am a beginner in Python and I have got a problem with
    the TKInter module.
    When I want to start e.g. pysol, I get following output:
    [output]
    Traceback (most recent call last):
    File "/usr/share/games/pysol/src/pysol.py", line 47, in ?
    from main import main
    File "/usr/share/games/pysol/src/main.py", line 48, in ?
    from app import Application
    File "/usr/share/games/pysol/src/app.py", line 54, in ?
    from images import Images, SubsampledImage s
    File "/usr/share/games/pysol/src/images.py", line 47, in ?
    from pysoltk import tkversion, loadImage, copyImage, createImage
    File "/usr/share/games/pysol/src/pysoltk.py", line 81, in ?
    exec "from " + m + " import *"
    File "<string>", line 1, in ?
    File "/usr/share/games/pysol/src/tk/tkconst.py", line 39, in ?
    import Tkinter
    File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured for Tk
    ImportError: No module named _tkinter
    [/output]

    I'am using Suse Linux 9.0 with Python 2.3.3.
    Can anybody help me?
    cu

  • Aahz

    #2
    Re: Get error &quot;ImportErr or: No module named _tkinter&quot;

    In article <bvbhl1$1td$05$ 1@news.t-online.com>,
    Sebastian Stelzer <deadlink27@web .de> wrote:[color=blue]
    >
    > import _tkinter # If this fails your Python may not be configured for Tk
    >ImportError: No module named _tkinter
    >
    >I'am using Suse Linux 9.0 with Python 2.3.3.[/color]

    You need to install Tck/Tk devel package, then rebuild Python.
    --
    Aahz (aahz@pythoncra ft.com) <*> http://www.pythoncraft.com/

    "The joy of coding Python should be in seeing short, concise, readable
    classes that express a lot of action in a small amount of clear code --
    not in reams of trivial code that bores the reader to death." --GvR

    Comment

    • Sebastian Stelzer

      #3
      Re: Get error &quot;ImportErr or: No module named _tkinter&quot;

      Aahz wrote:
      [color=blue]
      > In article <bvbhl1$1td$05$ 1@news.t-online.com>,
      > Sebastian Stelzer <deadlink27@web .de> wrote:[color=green]
      >>
      >> import _tkinter # If this fails your Python may not be configured for
      >> Tk
      >>ImportError : No module named _tkinter
      >>
      >>I'am using Suse Linux 9.0 with Python 2.3.3.[/color]
      >
      > You need to install Tck/Tk devel package, then rebuild Python.[/color]
      I did it and I' got the same error.
      Can you tell it more exactly please?

      Comment

      Working...