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


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

Installation Successful, but pythonw and idle doesn't function

Started by"Rick Smith" <python@activemail.us>
First post2015-08-05 16:12 +0000
Last post2015-08-06 08:56 +0200
Articles 5 — 3 participants

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


Contents

  Installation Successful, but pythonw and idle doesn't function "Rick Smith" <python@activemail.us> - 2015-08-05 16:12 +0000
    Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 00:09 +0200
      Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 00:14 +0200
      Re: Installation Successful, but pythonw and idle doesn't function Terry Reedy <tjreedy@udel.edu> - 2015-08-05 21:31 -0400
        Re: Installation Successful, but pythonw and idle doesn't function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 08:56 +0200

#95034 — Installation Successful, but pythonw and idle doesn't function

From"Rick Smith" <python@activemail.us>
Date2015-08-05 16:12 +0000
SubjectInstallation Successful, but pythonw and idle doesn't function
Message-ID<mailman.1245.1438807197.3674.python-list@python.org>
I was able to install various versions of Python (3.5.0b4 32bit being 
the most recent) multiple times (uninstalling in between) and they 
worked ("python --version" at the command line worked).

However pythonw.exe did not and does not work. I was simply returned to 
the command prompt, without ANY interaction or error.

   prompt>pythonw

   prompt>

I also attempted to run "idle", with the following results:

   C:\Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py
   ** IDLE can't import Tkinter.
   Your Python may not be configured for Tk. **

I finally attempted the installation using ONLY the default 
installation choice and got the same results. I had attempted previous 
installations using a "custom" configuration each time, also with the 
SAME results.

There was an older version (2.3.5) installed from a CD from a Python 
book, but this was uninstalled as well. (I believe that version did 
work with pythonw.)

I have checked online for answers and they involve adding paths to the 
"Path" environmental variable, moving libraries or deleting files in 
the ".idlerc" directory. I have attempted ALL of the. One mentioned 
using the ActiveState version, which I will try later.

So, I am at a complete loss -- I am running Windows Visa Home Premium 
32 bit, but I did not see any "incompatibility" with Vista mentioned. I 
did search for all "python" in the registry and did find "residue" from 
every unique version installed. I removed all of them and attempted a 
fresh, default install of the latest version -- same problem.


The path included:

C:\Users\judy\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\judy\AppData\Local\Programs\Python\Python35-32\;C:\Users\judy\AppData\Local\Programs\Python\Python35-32\DLLs;C:\Users\judy\AppData\Local\Programs\Python\Python35-32\LIB;C:\Users\judy\AppData\Local\Programs\Python\Python35-32\LIB\LIB-TK;C:\Users\judy\AppData\Local\Programs\Python\Python35-32\LIB\tkinter;

The long path was due to the default installation. I added the final 
path item.

I also added a "PythonPath" environment variable with the same contents 
as I saw that mentioned as a solution to this issue.

The problem seems rare and may be due to a previous installation and 
Vista -- I can't tell. Am willing to try anything.

I have NO idea of what to do next to install the python.org version on 
this Toshiba laptop.

Please let me know.


Thank you.

Rick Smith

[toc] | [next] | [standalone]


#95040

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-08-06 00:09 +0200
Message-ID<2089419.rtOe05Tiyo@PointedEars.de>
In reply to#95034
Rick Smith wrote:

> However pythonw.exe did not and does not work. I was simply returned to
> the command prompt, without ANY interaction or error.
> 
>    prompt>pythonw
> 
>    prompt>

Works as designed.  You are proceeding from a false assumption.  pythonw.exe 
is not meant to provide an interactive Python shell.  A little Web research 
would have showed that to you.

<http://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe>

(First hit for “pythonw” on Google with my account.  I have never visited 
that site before or can remember to have searched for “pythonw”.)
 
> I also attempted to run "idle", with the following results:
> 
>    C:
\Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py
>    ** IDLE can't import Tkinter.
>    Your Python may not be configured for Tk. **

I do not know IDLE well (if at all after all this time).  Make sure that you 
have installed the prerequisites.  But it strikes me as odd to run a GUI-
based application from the Windows command shell.  Is there not an icon that 
you can use instead to run it?  Presumably that would execute a .bat or .cmd 
script that sets up the PYTHONPATH.  RTFM, STFW.
 
-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


#95041

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-08-06 00:14 +0200
Message-ID<46417500.4ZKFyJPit3@PointedEars.de>
In reply to#95040
Thomas 'PointedEars' Lahn wrote:

> <http://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe>
> 
> (First hit for “pythonw” on Google with my account.  I have never visited
> that site before or can remember to have searched for “pythonw”.)

JFTR: s/site/question/.  I am rather active on Stack Overflow (but not much 
regarding Python, IIRC).
  
-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


#95055

FromTerry Reedy <tjreedy@udel.edu>
Date2015-08-05 21:31 -0400
Message-ID<mailman.1259.1438824676.3674.python-list@python.org>
In reply to#95040
On 8/5/2015 6:09 PM, Thomas 'PointedEars' Lahn wrote:
> Rick Smith wrote:

>> I also attempted to run "idle", with the following results:
>>
>>     C:
> \Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py
>>     ** IDLE can't import Tkinter.
>>     Your Python may not be configured for Tk. **

Rick, can you run python?  What happens with 'import tkinter'?

> I do not know IDLE well (if at all after all this time).  Make sure that you
> have installed the prerequisites.

A Windows install should install tkinter and Idle together.

 > But it strikes me as odd to run a GUI-
> based application from the Windows command shell.

This is the right thing to do when there is a problem, as some error 
messages get delivered to the console.  The prime example is the above. 
  If Idle cannot import tkinter, it cannot use a tkinter message box.

 > Is there not an icon that you can use instead to run it?

In the start menu, but that error message would not appear.


-- 
Terry Jan Reedy

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


#95071

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-08-06 08:56 +0200
Message-ID<1972506.uHfIMgh0XK@PointedEars.de>
In reply to#95055
Terry Reedy wrote:

> On 8/5/2015 6:09 PM, Thomas 'PointedEars' Lahn wrote:
>> Rick Smith wrote:
>>> I also attempted to run "idle", with the following results:
>>>
>>>     C:
>> \Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py
>>>     ** IDLE can't import Tkinter.
>>>     Your Python may not be configured for Tk. **
> 
> Rick, can you run python?  What happens with 'import tkinter'?
> 
>> I do not know IDLE well (if at all after all this time).  Make sure that
>> you have installed the prerequisites.
> 
> A Windows install should install tkinter and Idle together.
> 
>> But it strikes me as odd to run a GUI-based application from the Windows
>> command shell.
> 
> This is the right thing to do when there is a problem, as some error
> messages get delivered to the console.  The prime example is the above.
>   If Idle cannot import tkinter, it cannot use a tkinter message box.

Clarification: It is _not_ the right thing to do to run a GUI-based 
application obviously *written in Python*, like IDLE, *this way*.  Because, 
AISB, usually there is a script that sets up the environment (e.g. the 
PYTHONPATH), and the working directory may matter.

So one should always look for the application shortcut (icon) first, and, if 
found, use its properties to run the application.  In 32-bit Windows, the 
easiest way is to type Windows+R (or, in the Start Menu go to the search 
field, or select the “Run…” command), and type

  cmd /k "cd $WORKDIR & $COMMAND"

which changes to the working directory of the shortcut (replace $WORKDIR 
with what you find there), and if successful executes $COMMAND there (dito), 
while keeping the “Command Prompt” window open because the command shell 
does not exit (it would if you used “/c” instead of “/k”).

>  > Is there not an icon that you can use instead to run it?
> 
> In the start menu, but that error message would not appear.

Yes, the “Run command in shell” checkbox appears to be restricted to 
application icons on real operating systems :->

But you can modify the command of the shortcut to say “cmd /k 
"$ORIGINAL_COMMAND"” to work around this.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [standalone]


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


csiph-web