Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98151
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: python error |
| Date | 2015-11-03 08:34 -0500 |
| Message-ID | <mailman.18.1446557690.8789.python-list@python.org> (permalink) |
| References | <CALAqtxY=u7UA54cBN8wv9OTvVfdKhz_S12UDJqQ+Yq0HDgRe1Q@mail.gmail.com> |
On 11/3/2015 8:07 AM, Ruud van Rooijen wrote: > my code: > > from tkinter import * > > window = Tk() > label = Label(window, text="miniproject A1") > label.pack() > window.mainloop() > > > given error: > > C:\Users\Ruud\Python35\Scripts\python.exe Based on the below, python.exe should be in C:\Users\Ruud\AppData\Local\Programs\Python\Python35-32 _tkinter should then be in C:\Users\Ruud\AppData\Local\Programs\Python\Python35-32\DLLs If you moved it, that is your problem. If you have two python installations, with a second one in C:\Users\Ruud\Python35, then python.exe should be in that directory, NOT scripts. > C:/Users/Ruud/PycharmProjects/School/project.py I know essentially nothing about PyCharm, even if it is compatible with tkinter. > Traceback (most recent call last): > > File "C:/Users/Ruud/PycharmProjects/School/project.py", line 3, in <module> > > window = Tk() > > File "C:\Users\Ruud\AppData\Local\Programs\Python\Python35-32\Lib\tkinter\__init__.py", > line 1867, 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:/Users/Ruud/AppData/Local/Programs/Python/Python35-32/lib/tcl8.6 > C:/Users/Ruud/Python35/lib/tcl8.6 C:/Users/Ruud/lib/tcl8.6 > C:/Users/Ruud/Python35/library C:/Users/Ruud/library > C:/Users/Ruud/tcl8.6.4/library C:/Users/tcl8.6.4/library With a screwed up installation, or pair of installations, it looks 'everyplace' but the right place. > This probably means that Tcl wasn't installed properly. > i have repaired python several times and i can't find an answer online... > please help python.exe in scripts is not properly installed. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: python error Terry Reedy <tjreedy@udel.edu> - 2015-11-03 08:34 -0500
csiph-web