Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107148 > unrolled thread

error with tkinter, help

Started byblueridiculous@gmail.com
First post2016-04-16 18:31 -0700
Last post2016-04-18 05:08 +1000
Articles 6 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  error with tkinter, help blueridiculous@gmail.com - 2016-04-16 18:31 -0700
    Re: error with tkinter, help Terry Reedy <tjreedy@udel.edu> - 2016-04-17 00:29 -0400
      Re: error with tkinter, help BlueRidiculous <blueridiculous@gmail.com> - 2016-04-17 10:17 -0700
        Re: error with tkinter, help BlueRidiculous <blueridiculous@gmail.com> - 2016-04-17 10:24 -0700
          Re: error with tkinter, help BlueRidiculous <blueridiculous@gmail.com> - 2016-04-18 21:26 -0700
        Re: error with tkinter, help Chris Angelico <rosuav@gmail.com> - 2016-04-18 05:08 +1000

#107148 — error with tkinter, help

Fromblueridiculous@gmail.com
Date2016-04-16 18:31 -0700
Subjecterror with tkinter, help
Message-ID<47977d70-6208-4e68-aca3-e1f63aacfac7@googlegroups.com>
So I was reading https://wiki.python.org/moin/TkInter for help. I got to step 3 under "Checking your Tkinter support." Nothing happens when I do steps 1 or 2, and when I do step 3, I get this error:

"
Traceback (most recent call last):
  File "<string>", line 301, in runcode
  File "<interactive input>", line 1, in <module>
  File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
    root = Tk()
  File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.1/library C:/tcl8.6.1/library



This probably means that Tcl wasn't installed properly.
"

What should I do to get Tkinter working? Sorry if the answer should be obvious to me; I am not very experienced with Python.

[toc] | [next] | [standalone]


#107158

FromTerry Reedy <tjreedy@udel.edu>
Date2016-04-17 00:29 -0400
Message-ID<mailman.90.1460867418.6324.python-list@python.org>
In reply to#107148
On 4/16/2016 9:31 PM, blueridiculous@gmail.com wrote:
> So I was reading https://wiki.python.org/moin/TkInter for help.
 > I got to step 3 under "Checking your Tkinter support."
 > Nothing happens when I do steps 1 or 2, and when I do step 3,
 > I get this error:
>
> Traceback (most recent call last):
>   File "<string>", line 301, in runcode
>   File "<interactive input>", line 1, in <module>
>   File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
>     root = Tk()
>   File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
>     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> _tkinter.TclError: Can't find a usable init.tcl in the following directories:
>     C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.1/library C:/tcl8.6.1/library
>
> This probably means that Tcl wasn't installed properly.
> "

The directory list is obsolete.  You should have C:/Python34/tcl
How did you install Python?  The Windows PSF installer from python.org 
will create this directory unless you uncheck the box to include tcl/tk.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#107186

FromBlueRidiculous <blueridiculous@gmail.com>
Date2016-04-17 10:17 -0700
Message-ID<a72a152a-01bc-4128-900d-3e01ed51b1a0@googlegroups.com>
In reply to#107158
On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote:
> On 4/16/2016 9:31 PM, blueridiculous@gmail.com wrote:
> > So I was reading https://wiki.python.org/moin/TkInter for help.
>  > I got to step 3 under "Checking your Tkinter support."
>  > Nothing happens when I do steps 1 or 2, and when I do step 3,
>  > I get this error:
> >
> > Traceback (most recent call last):
> >   File "<string>", line 301, in runcode
> >   File "<interactive input>", line 1, in <module>
> >   File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
> >     root = Tk()
> >   File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
> >     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> > _tkinter.TclError: Can't find a usable init.tcl in the following directories:
> >     C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.1/library C:/tcl8.6.1/library
> >
> > This probably means that Tcl wasn't installed properly.
> > "
> 
> The directory list is obsolete.  You should have C:/Python34/tcl
> How did you install Python?  The Windows PSF installer from python.org 
> will create this directory unless you uncheck the box to include tcl/tk.
> 
> -- 
> Terry Jan Reedy

What is a PSF installer? Anyway, I installed the "Windows x86 MSI installer" from https://www.python.org/downloads/release/python-344/ Is that correct?

[toc] | [prev] | [next] | [standalone]


#107188

FromBlueRidiculous <blueridiculous@gmail.com>
Date2016-04-17 10:24 -0700
Message-ID<9cd33690-bb18-446b-9151-aedfd32693ca@googlegroups.com>
In reply to#107186
On Sunday, April 17, 2016 at 10:18:09 AM UTC-7, BlueRidiculous wrote:
> On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote:
> > On 4/16/2016 9:31 PM, blueridiculous@gmail.com wrote:
> > > So I was reading https://wiki.python.org/moin/TkInter for help.
> >  > I got to step 3 under "Checking your Tkinter support."
> >  > Nothing happens when I do steps 1 or 2, and when I do step 3,
> >  > I get this error:
> > >
> > > Traceback (most recent call last):
> > >   File "<string>", line 301, in runcode
> > >   File "<interactive input>", line 1, in <module>
> > >   File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
> > >     root = Tk()
> > >   File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
> > >     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> > > _tkinter.TclError: Can't find a usable init.tcl in the following directories:
> > >     C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.1/library C:/tcl8.6.1/library
> > >
> > > This probably means that Tcl wasn't installed properly.
> > > "
> > 
> > The directory list is obsolete.  You should have C:/Python34/tcl
> > How did you install Python?  The Windows PSF installer from python.org 
> > will create this directory unless you uncheck the box to include tcl/tk.
> > 
> > -- 
> > Terry Jan Reedy
> 
> What is a PSF installer? Anyway, I installed the "Windows x86 MSI installer" from https://www.python.org/downloads/release/python-344/ Is that correct?

Actually nevermind, I uninstalled and reinstalled Python and it works now. I remember I uninstalled and reinstalled before, and it worked, then stopped working, so I'm not sure how permanent this fix will be. Stay tuned for updates. Thanks again.

[toc] | [prev] | [next] | [standalone]


#107292

FromBlueRidiculous <blueridiculous@gmail.com>
Date2016-04-18 21:26 -0700
Message-ID<bf796bdd-3801-435c-80cd-10761c9696dc@googlegroups.com>
In reply to#107188
On Sunday, April 17, 2016 at 10:24:32 AM UTC-7, BlueRidiculous wrote:
> On Sunday, April 17, 2016 at 10:18:09 AM UTC-7, BlueRidiculous wrote:
> > On Saturday, April 16, 2016 at 9:30:39 PM UTC-7, Terry Reedy wrote:
> > > On 4/16/2016 9:31 PM, blueridiculous@gmail.com wrote:
> > > > So I was reading https://wiki.python.org/moin/TkInter for help.
> > >  > I got to step 3 under "Checking your Tkinter support."
> > >  > Nothing happens when I do steps 1 or 2, and when I do step 3,
> > >  > I get this error:
> > > >
> > > > Traceback (most recent call last):
> > > >   File "<string>", line 301, in runcode
> > > >   File "<interactive input>", line 1, in <module>
> > > >   File "C:\Python34\lib\tkinter\__init__.py", line 3882, in _test
> > > >     root = Tk()
> > > >   File "C:\Python34\lib\tkinter\__init__.py", line 1856, in __init__
> > > >     self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> > > > _tkinter.TclError: Can't find a usable init.tcl in the following directories:
> > > >     C:/Python34/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.1/library C:/tcl8.6.1/library
> > > >
> > > > This probably means that Tcl wasn't installed properly.
> > > > "
> > > 
> > > The directory list is obsolete.  You should have C:/Python34/tcl
> > > How did you install Python?  The Windows PSF installer from python.org 
> > > will create this directory unless you uncheck the box to include tcl/tk.
> > > 
> > > -- 
> > > Terry Jan Reedy
> > 
> > What is a PSF installer? Anyway, I installed the "Windows x86 MSI installer" from https://www.python.org/downloads/release/python-344/ Is that correct?
> 
> Actually nevermind, I uninstalled and reinstalled Python and it works now. I remember I uninstalled and reinstalled before, and it worked, then stopped working, so I'm not sure how permanent this fix will be. Stay tuned for updates. Thanks again.

So no need to "stay tuned for updates" anymore, it has been working for a day and I think that it is good now. If ever it breaks again, I'll just start a new thread. You guys can ignore this now. Thanks again to you guys for the help.

[toc] | [prev] | [next] | [standalone]


#107191

FromChris Angelico <rosuav@gmail.com>
Date2016-04-18 05:08 +1000
Message-ID<mailman.110.1460920123.6324.python-list@python.org>
In reply to#107186
On Mon, Apr 18, 2016 at 3:17 AM, BlueRidiculous
<blueridiculous@gmail.com> wrote:
>> How did you install Python?  The Windows PSF installer from python.org
>> will create this directory unless you uncheck the box to include tcl/tk.
>>
>> --
>> Terry Jan Reedy
>
> What is a PSF installer? Anyway, I installed the "Windows x86 MSI installer" from https://www.python.org/downloads/release/python-344/ Is that correct?

Yep, that answers the question! Thanks. For the TLDR version, skip to
the next email now. If you're curious, this is what Terry meant by
"PSF installer".

Python is available from a number of places. The most simple and
straight-forward installers come direct from the Python Software
Foundation, and are downloaded from python.org, which is what you've
done. You can also get prepackaged distributions from Enthought,
ActiveState, Anaconda, and other redistributors. They may charge money
for what they give you (this is legal, even with free software like
the Python interpreter), and they can promise things that the PSF
doesn't, such as support for old/obscure operating systems, guaranteed
response times on support requests, or pre-included (and
compatibility-guaranteed) third-party libraries.

What's significant here is that your problem is with the *installer*,
not with the language itself. When an organization repackages Python
in some way, they may replace the installer with something that puts
things in different places, or has different default options. It's not
very helpful for us to say "Rerun the installer, go to this point, and
tick this box" if you're actually using (say) Anaconda's installer and
it all looks different! So Terry was basically clarifying that he was
talking about the vanilla installer that you can get off python.org,
as opposed to any of the others.

Hope that helps!

ChrisA

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web