Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Installation Successful, but pythonw and idle doesn't function

863 views
Skip to first unread message

Rick Smith

unread,
Aug 5, 2015, 4:40:26 PM8/5/15
to pytho...@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

Thomas 'PointedEars' Lahn

unread,
Aug 5, 2015, 6:13:05 PM8/5/15
to
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.

Thomas 'PointedEars' Lahn

unread,
Aug 5, 2015, 6:18:45 PM8/5/15
to
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).

Terry Reedy

unread,
Aug 5, 2015, 9:11:05 PM8/5/15
to pytho...@python.org
On 8/5/2015 12:12 PM, Rick Smith wrote:
>
> 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.

C:\Programs\Python35>pythonw

C:\Programs\Python35>

Normal behavior.

Try
> python -m idlelib
or, if that does not start 3.5,
> py -3.5 -m idlelib
and you should either see Idle or an error message

If Idle is starting but not connecting, as you seems to say, there there
is a problems with your network socket configuration or another program.
Adding -n at the end of the command line will will bypass that, though
you could have other problems in certain situations.

Please see my Who uses IDLE? thread.

--
Terry Jan Reedy

Terry Reedy

unread,
Aug 5, 2015, 9:31:27 PM8/5/15
to pytho...@python.org
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

Zachary Ware

unread,
Aug 5, 2015, 10:43:58 PM8/5/15
to pyt...@activemail.us, pytho...@python.org
Hi Rick,

On Wed, Aug 5, 2015 at 11:12 AM, Rick Smith <pyt...@activemail.us> wrote:
> 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>

As I believe others have mentioned, 'pythonw' is not the one you want
to use 99% of the time. 'pythonw' is a 'win32' app rather than a
'console' app, meaning that it has no attached console, and if you
just run it with no arguments, it will appear to do nothing (though
actually, it starts, finds it has no input, and ends very quickly).

> 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. **

You hit upon a bug in 3.5.0b4, which is that the installer is broken
for tkinter unless you have Microsoft Visual Studio 2015 installed.
See http://bugs.python.org/issue24771 for details, the fix will be
included in 3.5.0rc1.

Your best bet is to avoid using pre-release software, and stick with
Python 3.4.3 until such time as 3.5.0 final is released.

Hope this helps,
--
Zach

Thomas 'PointedEars' Lahn

unread,
Aug 6, 2015, 3:00:06 AM8/6/15
to
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.

Terry Reedy

unread,
Aug 6, 2015, 4:55:24 AM8/6/15
to pytho...@python.org
On 8/5/2015 10:43 PM, Zachary Ware wrote:

>> 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. **
>
> You hit upon a bug in 3.5.0b4, which is that the installer is broken
> for tkinter unless you have Microsoft Visual Studio 2015 installed.
> See http://bugs.python.org/issue24771 for details, the fix will be
> included in 3.5.0rc1.

This is pretty unusual.

> Your best bet is to avoid using pre-release software, and stick with
> Python 3.4.3 until such time as 3.5.0 final is released.

Actually, people do a service by installing and testing pre-release
software. They just need to realize that this is what they are doing
;-). There was a bug in 3.4.0, I believe it was, that was caught on the
second day when someone installed and ran the test suite of their
software. It would have nicer if that testing had been done sooner.

--
Terry Jan Reedy

wxjm...@gmail.com

unread,
Aug 6, 2015, 5:40:27 AM8/6/15
to
I never succeded to install one of the 3.5.0b* on my "Windows 7
Professionel" (in French) box.

I do know and not able to understand if this is due to the installer,
the win box, the new MS-VS*** compiler or may be a strange interaction
between them.

Total backbox.

Zachary Ware

unread,
Aug 6, 2015, 9:55:01 AM8/6/15
to pytho...@python.org

On Aug 6, 2015 3:55 AM, "Terry Reedy" <tjr...@udel.edu> wrote:
> Actually, people do a service by installing and testing pre-release software.  They just need to realize that this is what they are doing ;-).

Indeed. However, I was assuming (possibly rashly, and if that's the case, my apologies to Rick) that Rick is quite new to Python, in which case he really is better off avoiding even pre-x.y.1 releases :). It's hard to learn something when you can't tell what's a bug, what's not, and what's just completely broken.

--
Zach
(On a phone)

0 new messages