Re: IDLE GUI not working
On Sun, Dec 26, 2010 at 4:33 PM, Python Programming wrote: > Hello all, > > Newbie here so go easy on me. I've been trying to get the IDLE GUI to > work on my machine, but have been unsuccessful so far. I have an IBM > Thinkpad running Windows XP and it has an older version of Python > running (2.2, I believe). When I try to use the shortcut to open the > IDLE GUI nothing happens (not even a process running in task > manager). When I use the cmd line to try to open the IDLE GUI, I get > this error message: > > > C:\>C:\python27\python C:\python27\Lib\idlelib\idle.py > Traceback (most recent call last): > File "C:\python27\Lib\idlelib\idle.py", line 11, in >idlelib.PyShell.main() > File "C:\python27\Lib\idlelib\PyShell.py", line 1389, in main >root = Tk(className="Idle") > File "C:\python27\lib\lib-tk\Tkinter.py", line 1685, in __init__ >self.tk = _tkinter.create(screenName, baseName, className, > interactive, want > objects, useTk, sync, use) > _tkinter.TclError: Can't find a usable init.tcl in the following > directories: >{C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 > C:/python2 > 7/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/ > tcl8.5.2/libra > ry C:/tcl8.5.2/library > > C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for package > "Tcl": ha > ve 8.5.2, need exactly 8.4 > version conflict for package "Tcl": have 8.5.2, need exactly 8.4 >while executing > "package require -exact Tcl 8.4" >(file "C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" line 19) >invoked from within > "source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" >("uplevel" body line 1) >invoked from within > "uplevel #0 [list source $tclfile]" > > > This probably means that Tcl wasn't installed properly. > > > As I understand this, python 2.7 is looking in a directory or path > specified by the older, python 2.2 for Tcl. I have tried to unset > this path by entering this into the cmd line: > > --- > C:\>set TCL_LIBRARY= > C:\>set TK_LIBRARY= > C:\>C:\Python27\python.exe C:\Python27\Lib\idlelib\idle.py > --- > > No dice. > > I tried to enter this information as a new pythonpath in the > environment variables. No dice. > > I've tried, in vain, to get this thing working, but most of the other > explanations are way over my head (I'm pretty new to programming and > digging around the programming guts of computers) > > It seems like a fairly common problem, but haven't gotten a good > answer from either the official python help boards or elsewhere. I > was hoping that someone here could give me a easy to understand way to > make the IDLE GUI work. > > Thanks in advance. > -- > http://mail.python.org/mailman/listinfo/python-list Wow, I wrote a note to this list so closely resembling yours I had to read carefully to ensure it wasn't my own. You have a PATH problem - these machines ship with Tcl installed and that's creating this issue. There is the standard Path variable, but if you'll notice, there is also a scrollbar to the right. Scroll down and find additional variables that need fixed - PythonPath, TCL_Library, and TK Library all need to be redirected to your current install. If you fix all of these, your problem should be solved and you'll be on your way, at least that was my exact issue on a Thinkpad running XP. Best of luck! Grant -- http://mail.python.org/mailman/listinfo/python-list
Starting Python in XP Pro
I'm a beginning user with some challenges. I have installed and uninstalled several versions with the same results - I can't get IDLE to work, nor can I associate .py files with Python. So I can get the interactive shell interface but nothing else. I'm currently running ActiveState 2.6. Any thoughts on where to begin are appreciated. Thanks! Grant -- http://mail.python.org/mailman/listinfo/python-list
Re: Starting Python in XP Pro
I hear that...God knows if I had a more complete question, I'd type it - basically, when I click the IDLE GUI icon from the Start Menu, there is a flash of a command prompt loading, then nothing happens. I've tried a number of things at the command prompt over the last two weeks and five versions. I went to ActiveState because I was thinking I had not configured something properly in the Python.org versions, however, the behavior is the same. I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that returned: C:\>C:\python26\lib\idlelib\idle.py Traceback (most recent call last): File "C:\python26\lib\idlelib\idle.py", line 21, in idlelib.PyShell.main() File "C:\Python26\lib\idlelib\PyShell.py", line 1386, in main root = Tk(className="Idle") File "C:\Python26\lib\lib-tk\Tkinter.py", line 1643, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, want objects, useTk, sync, use) _tkinter.TclError: Can't find a usable init.tcl in the following directories: {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 C:/Python2 6/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/tcl8.5.8/libra ry C:/tcl8.5.8/library C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for package "Tcl": ha ve 8.5.8, need exactly 8.4 version conflict for package "Tcl": have 8.5.8, need exactly 8.4 while executing "package require -exact Tcl 8.4" (file "C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" line 19) invoked from within "source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $tclfile]" This probably means that Tcl wasn't installed properly. I hope this helps. Thanks again for any help. Grant On Sat, Oct 16, 2010 at 6:30 PM, Dave Angel wrote: > On 2:59 PM, Grant Andrew wrote: > >> I'm a beginning user with some challenges. I have installed and >> uninstalled >> several versions with the same results - I can't get IDLE to work, nor can >> I >> associate .py files with Python. >> >> So I can get the interactive shell interface but nothing else. I'm >> currently running ActiveState 2.6. >> >> Any thoughts on where to begin are appreciated. >> >> Thanks! >> >> Grant >> >> You could start by writing a more complete question. Exactly what have > you tried, and in what way does it "not work" ? Show what you typed at the > command prompt, and just what error messages you got. Use copy & paste, > don't retype it. > > With the ActiveState default install, you shouldn't need to create your own > association; it should already be done by the installation. However, if > you install multiple versions, and don't properly uninstall, it might change > the default. > > Have you tried running python.exe explicitly? > > DaveA > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Starting Python in XP Pro
1. Okay, I can open the interpreter and do math. If only I needed the answer to 6*7 I'd be great. But, to your point, Python is installed and working. 2. When I went to the shortcut and hit properties, the path was Target: C:\Python26\Lib\idlelib\idle.bat Start in: C:\Python26\ I cd'd to C:\Python26\ at the command prompt and ran Lib\idlelib\idle.bat. It just reprints C:\Python26\ with no error or message. Looks like this: C:\Python26>Lib\idlelib\idle.bat C:\Python26> 3. I created a simple file in Wordpad that prints a few lines. It is called Print.py but I'm not sure where the 'code' folder is. I'm not familiar enough with Python to locate a file from the Interpreter and open it. 4. I also tried editing the PATH variable, which did have both versions in it, but with no success - same error. Thanks for your help... Grant On Sun, Oct 17, 2010 at 4:17 AM, Dave Angel wrote: > On 10/16/2010 11:27 PM, Grant Andrew wrote: > >> I hear that...God knows if I had a more complete question, I'd type it - >> basically, when I click the IDLE GUI icon from the Start Menu, there is a >> flash of a command prompt loading, then nothing happens. >> >> I've tried a number of things at the command prompt over the last two >> weeks >> and five versions. I went to ActiveState because I was thinking I had not >> configured something properly in the Python.org versions, however, the >> behavior is the same. >> >> I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that >> returned: >> >> >> > > You probably need to start with fundamentals. That means using a command > prompt. As you've noticed, many times a program started from the start menu > doesn't leave its command window open long enough to read the messages. > > I'm afraid I can't really help with Idle; I've never tried using it, till > today. When I start if from ActiveState's menu, it flashes and exits for me > as well. Perhaps because we both have Thinkpads. I notice the IBMTools > directory in your traceback. Perhaps there's an old version of TCL there > that's interfering with the one Idle needs. To start debugging it, figure > out what the menu shortcut is doing, and do it yourself from a command > window. In my case, StartIdle-right-click->properties->shortcut shows me: > > Target C:\Progfiles\ActivePython26\Lib\idlelib\idle.bat > Start in: c:\progfiles\activePython26 > > So you CD to the latter directory (or rather, to your equivalent one), and > type lib\idlelib\idle.bat > > When I do that, I get an error message: "IDLE's subprocess didn't make > connection. Either IDLE can't start a subprocess or personal firewall > software is blocking." > > But let's get your python itself working. ActivePython's install adds > itself to your path, so you should be able to just type > python > or python26 > > at the C: prompt, and get a Python interpreter prompt. Then do something > like > >>> print 3*4 > > to see if it's working. > > Next, write a small xxx.py program, in your code directory, and NOT in the > Python install directory. From that code directory, type > python xxx.py > > or whatever you called it. Let us know if it works. > > Only then should you worry about associations. You can check them with > assoc and ftype, but people tell me that's not reliable if there is more > than one user on the machine, or specifically if you have created > user-specific associations, which take precedence over the ones in assoc and > ftype. > > DaveA > > > -- http://mail.python.org/mailman/listinfo/python-list
Re: Starting Python in XP Pro
Success - I worked with a friend who is Python-fluent to diagnose this issue and it turns out that in addition to the PATH variable, there were TCL and TK variables that were pointing toward an old install of Python. With these references pointed toward the correct folders in the current install, all is well. Now I can get to the work of learning Python, instead of bleeding through the eyes. Thanks for all of the help!! Grant On Sun, Oct 17, 2010 at 12:12 PM, Dennis Lee Bieber wrote: > On Sat, 16 Oct 2010 21:27:11 -0600, Grant Andrew > declaimed the following in gmane.comp.python.general: > > > > > I ran C:\>C:\python26\lib\idlelib\idle.py at the command prompt and that > > returned: > > > > > > {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 > > C:/Python2 > > 6/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library > > C:/tcl8.5.8/libra > > ry C:/tcl8.5.8/library > > > And there is your answer... Your system apparently came with Python > 2.2 installed by IBM and IT is on the search path AHEAD of the Python2.6 > stuff. > >You probably need to edit the PATH environment variable for user > account to not reference the factory installed Python/tcl > >Since my system didn't have a factory Python, I was able to put my > install on the system PATH rather than the user PATH. (Hmm, I need to > edit the system PATH -- regina is no longer on C:, and I seem to have > duplicates of Roxio paths; only the last two items are my user account > path) > > PATH=e:\Python25\; E:\GNAT\2008\bin; C:\WINDOWS\system32; C:\WINDOWS; > C:\WINDOWS\System32\Wbem; C:\Program Files\SciTE; C:\Program > Files\Java\jre1.6.0_03\bin ;C:\Program Files\Java\jdk1.6.0_03\bin; > C:\Program Files\Common Files\Adobe\AGL; C:\Tcl\bin; C:\Program > Files\Common Files\Roxio Shared\9.0\DLLShared\; C:\Program Files\Common > Files\Roxio Shared\DLLShared\; c:\Regina; C:\Program > Files\TortoiseSVN\bin; C:\PROGRA~1\MySQL\MySQL Server 5.0\bin; > E:\GNAT\GtkAda\bin;C:\MSSQL7\BINN;c:\PROGRA~1 > \sdb\programs\bin; c:\PROGRA~1\sdb\programs\pgm; e:\python25\scripts; > C:\WINDOWS\system32\WindowsPowerShell\v1.0; C:\Program Files\Common > Files\Roxio Shared\DLLShared\; C:\Program Files\Common Files\Roxio > Shared\9.0\DLLShared\; C:\Program Files\QuickTime\QTSystem\; > C:\WINDOWS\system32\WindowsPowerShell\v1.0; c:\bin; e:\regina > -- >Wulfraed Dennis Lee Bieber AF6VN >wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/ > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list