I have an app-engine app that is deployed and running on the standard Python3 runtime. I am also able to run it locally using normal commands like flask run
. But I am unable to run it the way I could run apps in the 2.7 runtime with dev_appserver.py
. I am using the latest gcloud
version, but running dev_appserver.py
results in:
ERROR: Python 3 and later is not compatible with the Google Cloud SDK. Please use Python version 2.7.x.
I assumed we just aren't supposed to do it this way any more until it saw: https://cloud.google.com/appengine/docs/standard/python3/tools/local-devserver-command
Which starts with:
Python 3.7 Local Development Server Options
Usage:
dev_appserver.py [options] yaml_path [files...]
Is dev_appserver.py
compatible with Python3 or not (maybe I somehow have an old version in my path)? If not, is there a new way to run apps locally that will adhere to the app.yaml(like treating static paths correctly) and give other niceties like the local data store that dev_appserver.py
provided?
The
dev_appserver.py
support for Python 3 is still limited. From Running the local development server:Which might be why it is not the recommended solution for local development (or at least not yet). From Running locally:
For windows 10 :
The solution was to install a linux subsystem for windows : https://docs.microsoft.com/en-us/windows/wsl/install-win10
I use the Ubuntu app from the windows store, and follow the installation for installing the gcloud component on linux inside the ubuntu terminal: https://https://docs.microsoft.com/en-us/windows/wsl/install-win10cloud.google.com/sdk/docs/#deb
Inside the Ubuntu terminal it is possible to access the windows file : the C drive would be /mnt/c. Getting back to my work folder, it is possible to start the web-app using the dev_appserver command.
Using a navigator from windows we have access to the web-app as normal using localhost:8080.
The development can still be done using an IDE in windows, running the server in Ubuntu.