Problem with Tk on Windows

S

Simon Foster

Hi all,

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

---
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:\python23\lib\lib-tk\Tkinter.py", line 1564, in __init__
self.tk = _tkinter.create(screenName, baseName, className)
_tkinter.TclError: 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.
 
M

Miki Tebeka

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

---

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:\python23\lib\lib-tk\Tkinter.py", line 1564, in __init__
self.tk = _tkinter.create(screenName, baseName, className)
_tkinter.TclError: 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.
Just a guess, check if you have environment variable called TCL_HOME,
if so try to remove it.

HTH.
Miki.
 
M

Michael Hudson

Hi all,

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

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

Cheers,
mwh
 
S

Simon Foster

Hello Simon,

Just a guess, check if you have environment variable called TCL_HOME,
if so try to remove it.

HTH.
Miki.

No, no such environment variable!
 
C

Christos TZOTZIOY Georgiou

Hi all,

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

---

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "c:\python23\lib\lib-tk\Tkinter.py", line 1564, in __init__
self.tk = _tkinter.create(screenName, baseName, className)
_tkinter.TclError: Can't find a usable init.tcl in the following
directories:
c:/python23/lib/tcl8.4 c:/lib/tcl8.4 c:/library

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 :)
 
S

Simon Foster

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 :)

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

{'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users.WINNT',
'APPDATA': 'C:\\Documents and Settings\\Simon
Foster.BERYLLIUM\\Application Data',
'COMPUTERNAME': 'BERYLLIUM',
'ComSpec': 'C:\\WINNT\\system32\\cmd.exe',
'CommonProgramFiles': 'C:\\Program Files\\Common Files',
'HOMEDRIVE': 'C:',
'HOMEPATH': '\\Documents and Settings\\Simon Foster.BERYLLIUM',
'LOGONSERVER': '\\\\BERYLLIUM',
'MSDevDir': 'C:\\Program Files\\Microsoft Visual
Studio\\Common\\MSDev98',
'NMAPDIR': 'C:\\Program Files\\NMapWin\\',
'NUMBER_OF_PROCESSORS': '1',
'OS': 'Windows_NT',
'Os2LibPath': 'C:\\WINNT\\system32\\os2\\dll;',
'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH',
'PROCESSOR_ARCHITECTURE': 'x86',
'PROCESSOR_IDENTIFIER': 'x86 Family 6 Model 6 Stepping 2,
AuthenticAMD',
'PROCESSOR_LEVEL': '6',
'PROCESSOR_REVISION': '0602',
'PROMPT': '$P$G',
'PYTHONPATH': 'C:\\Documents and Settings\\Simon
Foster.BERYLLIUM\\jython-2.1\\Lib',
'Path':
'C:\\Perl\\bin\\;C:\\WINNT\\system32;C:\\WINNT;C:\\WINNT\\System32\\Wbem;C:\\Program
Files\\NMapWin\\\\bin;c:\\python23;C:\\Program
Files\\j2sdk_nb\\j2sdk1.4.2\\bin;C:\\Program Files\\Microsoft Visual
Studio\\Common\\Tools\\WinNT;C:\\Program Files\\Microsoft Visual
Studio\\Common\\MSDev98\\Bin;C:\\Program Files\\Microsoft Visual
Studio\\Common\\Tools;C:\\Program Files\\Microsoft Visual
Studio\\VC98\\bin',
'ProgramFiles': 'C:\\Program Files',
'SystemDrive': 'C:',
'SystemRoot': 'C:\\WINNT',
'TEMP': 'C:\\DOCUME~1\\SIMONF~1.BER\\LOCALS~1\\Temp',
'TMP': 'C:\\DOCUME~1\\SIMONF~1.BER\\LOCALS~1\\Temp',
'USERDOMAIN': 'BERYLLIUM',
'USERNAME': 'Simon Foster',
'USERPROFILE': 'C:\\Documents and Settings\\Simon Foster.BERYLLIUM',
'include': 'C:\\Program Files\\Microsoft Visual
Studio\\VC98\\atl\\include;C:\\Program Files\\Microsoft Visual
Studio\\VC98\\mfc\\include;C:\\Program Files\\Microsoft Visual
Studio\\VC98\\include',
'lib': 'C:\\Program Files\\Microsoft Visual
Studio\\VC98\\mfc\\lib;C:\\Program Files\\Microsoft Visual
Studio\\VC98\\lib',
'windir': 'C:\\WINNT'}

I have another init.tcl in C:\cygwin\usr\share\tcl8.4. Would that
have something to do with it? I've tried
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top