473,388 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Problem with Tk on Windows


Hi all,

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

---
import Tkinter
root = Tkinter.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.

---

Anyone know the solution?
--
Simon Foster
Somewhere in the West of England
Jul 18 '05 #1
6 4420
Hello Simon,
Has anyone seen the follwoing message on the Windows platform
when tring to use Tk?

---
import Tkinter
root = Tkinter.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.

---

Anyone know the solution?

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

HTH.
Miki.
Jul 18 '05 #2
si***@uggs.demon.co.uk (Simon Foster) writes:
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

--
ARTHUR: Why should a rock hum?
FORD: Maybe it feels good about being a rock.
-- The Hitch-Hikers Guide to the Galaxy, Episode 8
Jul 18 '05 #3
On 26 Oct 2003 23:38:44 -0800, mi***@zoran.co.il (Miki Tebeka) wrote:
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!
--
Simon Foster
Somewhere in the West of England
Jul 18 '05 #4
On Mon, 27 Oct 2003 20:36:57 GMT, Michael Hudson <mw*@python.net>
wrote:
si***@uggs.demon.co.uk (Simon Foster) writes:
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


Nope, no Ruby.
--
Simon Foster
Somewhere in the West of England
Jul 18 '05 #5
On Mon, 27 Oct 2003 00:46:26 GMT, rumours say that
si***@uggs.demon.co.uk (Simon Foster) might have written:
Hi all,

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

---
import Tkinter
root = Tkinter.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 :)
--
TZOTZIOY, I speak England very best,
Ils sont fous ces Redmontains! --Harddix
Jul 18 '05 #6
On Tue, 28 Oct 2003 05:21:31 +0200, Christos "TZOTZIOY" Georgiou
<tz**@sil-tec.gr> wrote:
On Mon, 27 Oct 2003 00:46:26 GMT, rumours say that
si***@uggs.demon.co.uk (Simon Foster) might have written:
Hi all,

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

---
> import Tkinter
> root = Tkinter.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 :)


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
--
Simon Foster
Somewhere in the West of England
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Wolfgang Kaml | last post by:
Hello All, I have been researching newsgroups and knowledgebase all morning and not found a solution that would solve the problem I have. I am having an ASP or ASPX web page that implement a...
1
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
3
by: pnp | last post by:
Hi all, I have developed an app in C# and I have used some of the Infragistics components in it. The problem is that while one is playing with the windows within the mdi container exceptions occur...
2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
4
by: pepcag | last post by:
I used http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconalteringsoapmessageusingsoapextensions.asp as a template to create a very simple web method with soap...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
5
by: Vibhesh | last post by:
I am facing problem with TimeSpan structure when DirectX is used. Following is the sample code that causes the problem: ...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.