When I install the Google App Engine SDK and run the launcher, it asks me to configure the python location:
And when I open Preferences
, it asks for a path to a python executable:
Which path should I insert and what is the difference:
Looks like Google App Engine couldn't find your python installation. It looks for Python by checking the PATH
environment variable, so it's best to use it.
The short answer is use C:\Python27\pythonw.exe
. I've just installed the latest "GoogleAppEngine-1.9.33.msi", and after I ran "Google App Engine launcher" (C:\Program Files (x86)\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe
), in "Edit -> Preferences" I saw "C:\Python35\pythonw.exe
". (It is because I have Python 3.5 folder before Python 2.7 folder in my Path
environment variable setting.) But the point is App Engine launcher (or installer) chose the pythonw.exe
over python.exe
all by itself.
But as a better solution, I would suggest you to set your Path
environment variable, this will prevent other similar issues in the future.
To set Python on the Path
, if it's not set:
C:\Python27\;C:\Python27\Scripts;
to the beginning of the line. Make sure you don't accidently delete anything there!Alternatively in item 5, you might want to use user's PATH
from the upper list. I would set Python for all users as I described.
Now launch Google App Engine via "Google App Engine Launcher" and see if in "Edit -> Preferences" you have either "Default if not set: C:\Python27\pythonw.exe" or "Default if not set: C:\Python27\python.exe" written below the field for "Python path". If there's still nothing similar, then it's not the launcher that checks for PATH
, but it's the Installer. Then now it's time to uninstall "Google App Engine" and install it again. After this everything should work as expected. (Btw, Installer checks for Python and other dependecies, so it should report if there're any errors.)
The main difference between python.exe
and pythonw.exe
is:
python.exe
opens console widow when a module is executed with it,
or, if run directly from command line, executes a module in a current
console window preventing any further commands until the module
exits. So basically intended for console applications or debugging.pythonw.exe
on the other hand is intended for GUI apps or no-GUI
apps, so if a module is executed with pythonw.exe
, then there's no
console window is open, if run via current console a module is
executed in a separate process and the console is available for further
commands right away. The drawback is no output is provided in this
case, i.e. no errors printed as there's no console window associated
with running Python module.Fore details see: official docs, chapter from a book(small but informative), Python mailing list.
Now regarding Google App Engine, on installation page they state:
You will need Python 2.7 to use the App Engine SDK, because the Development Server is a Python application. Download Python 2.7.X (don't use a higher version) from the Python web site.
So since a server is a no-GUI application, that's probably why App Engine chooses pythonw.exe
.
According to this QA, pythonw seems to be preferable: https://code.google.com/p/googleappengine/issues/detail?id=11246
Here's the similiar question and answer: pythonw.exe or python.exe?
python.exe is a console (terminal) application for launching CLI-type scripts.
pythonw.exe is a GUI app for launching GUI/no-UI-at-all scripts.
From looking at the the docs: https://docs.python.org/2/using/windows.html#executing-scripts
Pythonw basically suppresses the console window. I wouldn't think you'd need one using the app-engine, so, pythonw.exe would be my best guess.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With