Problem with Tk on Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Foster

    Problem with Tk on Windows


    Hi all,

    Has anyone seen the follwoing message on the Windows platform
    when tring to use Tk?

    ---
    [color=blue][color=green][color=darkred]
    >>> import Tkinter
    >>> root = Tkinter.Tk()[/color][/color][/color]
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "c:\python23\li b\lib-tk\Tkinter.py", line 1564, in __init__
    self.tk = _tkinter.create (screenName, baseName, className)
    _tkinter.TclErr or: Can't find a usable init.tcl in the following
    directories:
    c:/python23/lib/tcl8.4 c:/lib/tcl8.4 c:/library



    This probably means that Tcl wasn't installed properly.

    ---

    Anyone know the solution?
    --
    Simon Foster
    Somewhere in the West of England
  • Miki Tebeka

    #2
    Re: Problem with Tk on Windows

    Hello Simon,
    [color=blue]
    > Has anyone seen the follwoing message on the Windows platform
    > when tring to use Tk?
    >
    > ---
    >[color=green][color=darkred]
    > >>> import Tkinter
    > >>> root = Tkinter.Tk()[/color][/color]
    > Traceback (most recent call last):
    > File "<stdin>", line 1, in ?
    > File "c:\python23\li b\lib-tk\Tkinter.py", line 1564, in __init__
    > self.tk = _tkinter.create (screenName, baseName, className)
    > _tkinter.TclErr or: Can't find a usable init.tcl in the following
    > directories:
    > c:/python23/lib/tcl8.4 c:/lib/tcl8.4 c:/library
    >
    >
    >
    > This probably means that Tcl wasn't installed properly.
    >
    > ---
    >
    > Anyone know the solution?[/color]
    Just a guess, check if you have environment variable called TCL_HOME,
    if so try to remove it.

    HTH.
    Miki.

    Comment

    • Michael Hudson

      #3
      Re: Problem with Tk on Windows

      simon@uggs.demo n.co.uk (Simon Foster) writes:
      [color=blue]
      > Hi all,
      >
      > Has anyone seen the follwoing message on the Windows platform
      > when tring to use Tk?[/color]

      Have you got Ruby installed? Complain to them about their installer
      :-)

      Cheers,
      mwh

      --
      ARTHUR: Why should a rock hum?
      FORD: Maybe it feels good about being a rock.
      -- The Hitch-Hikers Guide to the Galaxy, Episode 8

      Comment

      • Simon Foster

        #4
        Re: Problem with Tk on Windows

        On 26 Oct 2003 23:38:44 -0800, mikit@zoran.co. il (Miki Tebeka) wrote:
        [color=blue]
        >Hello Simon,
        >
        >Just a guess, check if you have environment variable called TCL_HOME,
        >if so try to remove it.
        >
        >HTH.
        >Miki.[/color]

        No, no such environment variable!
        --
        Simon Foster
        Somewhere in the West of England

        Comment

        • Simon Foster

          #5
          Re: Problem with Tk on Windows

          On Mon, 27 Oct 2003 20:36:57 GMT, Michael Hudson <mwh@python.net >
          wrote:
          [color=blue]
          >simon@uggs.dem on.co.uk (Simon Foster) writes:
          >[color=green]
          >> Hi all,
          >>
          >> Has anyone seen the follwoing message on the Windows platform
          >> when tring to use Tk?[/color]
          >
          >Have you got Ruby installed? Complain to them about their installer
          >:-)
          >
          >Cheers,
          >mwh[/color]

          Nope, no Ruby.
          --
          Simon Foster
          Somewhere in the West of England

          Comment

          • Christos TZOTZIOY Georgiou

            #6
            Re: Problem with Tk on Windows

            On Mon, 27 Oct 2003 00:46:26 GMT, rumours say that
            simon@uggs.demo n.co.uk (Simon Foster) might have written:
            [color=blue]
            >Hi all,
            >
            >Has anyone seen the follwoing message on the Windows platform
            >when tring to use Tk?
            >
            >---
            >[color=green][color=darkred]
            >>>> import Tkinter
            >>>> root = Tkinter.Tk()[/color][/color]
            >Traceback (most recent call last):
            > File "<stdin>", line 1, in ?
            > File "c:\python23\li b\lib-tk\Tkinter.py", line 1564, in __init__
            > self.tk = _tkinter.create (screenName, baseName, className)
            >_tkinter.TclEr ror: Can't find a usable init.tcl in the following
            >directories:
            > c:/python23/lib/tcl8.4 c:/lib/tcl8.4 c:/library[/color]

            Rhetorical: why is it searching in c:/python23/lib/tcl8.4 and not in
            c:/python23/tcl/tcl8.4, where it should be?

            Simon, please send the environment variables (import os; print
            os.environ) you have, and search for all init.tcl files in your hard
            drives for possible other installations. Also: which version of Python
            did you install? Or did you build it your self?

            Try to improvise in giving us more info, cause I can't think anything
            else now :)
            --
            TZOTZIOY, I speak England very best,
            Ils sont fous ces Redmontains! --Harddix

            Comment

            • Simon Foster

              #7
              Re: Problem with Tk on Windows

              On Tue, 28 Oct 2003 05:21:31 +0200, Christos "TZOTZIOY" Georgiou
              <tzot@sil-tec.gr> wrote:
              [color=blue]
              >On Mon, 27 Oct 2003 00:46:26 GMT, rumours say that
              >simon@uggs.dem on.co.uk (Simon Foster) might have written:
              >[color=green]
              >>Hi all,
              >>
              >>Has anyone seen the follwoing message on the Windows platform
              >>when tring to use Tk?
              >>
              >>---
              >>[color=darkred]
              >>>>> import Tkinter
              >>>>> root = Tkinter.Tk()[/color]
              >>Traceback (most recent call last):
              >> File "<stdin>", line 1, in ?
              >> File "c:\python23\li b\lib-tk\Tkinter.py", line 1564, in __init__
              >> self.tk = _tkinter.create (screenName, baseName, className)
              >>_tkinter.TclE rror: Can't find a usable init.tcl in the following
              >>directories :
              >> c:/python23/lib/tcl8.4 c:/lib/tcl8.4 c:/library[/color]
              >
              >Rhetorical: why is it searching in c:/python23/lib/tcl8.4 and not in
              >c:/python23/tcl/tcl8.4, where it should be?
              >
              >Simon, please send the environment variables (import os; print
              >os.environ) you have, and search for all init.tcl files in your hard
              >drives for possible other installations. Also: which version of Python
              >did you install? Or did you build it your self?
              >
              >Try to improvise in giving us more info, cause I can't think anything
              >else now :)[/color]

              I have version 2.3.2 installed. It's the windows binary direct from
              the Python website. My environment looks like the following:

              {'ALLUSERSPROFI LE': 'C:\\Documents and Settings\\All Users.WINNT',
              'APPDATA': 'C:\\Documents and Settings\\Simon
              Foster.BERYLLIU M\\Application Data',
              'COMPUTERNAME': 'BERYLLIUM',
              'ComSpec': 'C:\\WINNT\\sys tem32\\cmd.exe' ,
              'CommonProgramF iles': 'C:\\Program Files\\Common Files',
              'HOMEDRIVE': 'C:',
              'HOMEPATH': '\\Documents and Settings\\Simon Foster.BERYLLIU M',
              'LOGONSERVER': '\\\\BERYLLIUM' ,
              'MSDevDir': 'C:\\Program Files\\Microsof t Visual
              Studio\\Common\ \MSDev98',
              'NMAPDIR': 'C:\\Program Files\\NMapWin\ \',
              'NUMBER_OF_PROC ESSORS': '1',
              'OS': 'Windows_NT',
              'Os2LibPath': 'C:\\WINNT\\sys tem32\\os2\\dll ;',
              'PATHEXT': '.COM;.EXE;.BAT ;.CMD;.VBS;.VBE ;.JS;.JSE;.WSF; .WSH',
              'PROCESSOR_ARCH ITECTURE': 'x86',
              'PROCESSOR_IDEN TIFIER': 'x86 Family 6 Model 6 Stepping 2,
              AuthenticAMD',
              'PROCESSOR_LEVE L': '6',
              'PROCESSOR_REVI SION': '0602',
              'PROMPT': '$P$G',
              'PYTHONPATH': 'C:\\Documents and Settings\\Simon
              Foster.BERYLLIU M\\jython-2.1\\Lib',
              'Path':
              'C:\\Perl\\bin\ \;C:\\WINNT\\sy stem32;C:\\WINN T;C:\\WINNT\\Sy stem32\\Wbem;C: \\Program
              Files\\NMapWin\ \\\bin;c:\\pyth on23;C:\\Progra m
              Files\\j2sdk_nb \\j2sdk1.4.2\\b in;C:\\Program Files\\Microsof t Visual
              Studio\\Common\ \Tools\\WinNT;C :\\Program Files\\Microsof t Visual
              Studio\\Common\ \MSDev98\\Bin;C :\\Program Files\\Microsof t Visual
              Studio\\Common\ \Tools;C:\\Prog ram Files\\Microsof t Visual
              Studio\\VC98\\b in',
              'ProgramFiles': 'C:\\Program Files',
              'SystemDrive': 'C:',
              'SystemRoot': 'C:\\WINNT',
              'TEMP': 'C:\\DOCUME~1\\ SIMONF~1.BER\\L OCALS~1\\Temp',
              'TMP': 'C:\\DOCUME~1\\ SIMONF~1.BER\\L OCALS~1\\Temp',
              'USERDOMAIN': 'BERYLLIUM',
              'USERNAME': 'Simon Foster',
              'USERPROFILE': 'C:\\Documents and Settings\\Simon Foster.BERYLLIU M',
              'include': 'C:\\Program Files\\Microsof t Visual
              Studio\\VC98\\a tl\\include;C:\ \Program Files\\Microsof t Visual
              Studio\\VC98\\m fc\\include;C:\ \Program Files\\Microsof t Visual
              Studio\\VC98\\i nclude',
              'lib': 'C:\\Program Files\\Microsof t Visual
              Studio\\VC98\\m fc\\lib;C:\\Pro gram Files\\Microsof t Visual
              Studio\\VC98\\l ib',
              'windir': 'C:\\WINNT'}

              I have another init.tcl in C:\cygwin\usr\s hare\tcl8.4. Would that
              have something to do with it? I've tried
              --
              Simon Foster
              Somewhere in the West of England

              Comment

              Working...