I am new to GAE and while doing a course, I needed to install it on my system. I followed the instructions on the GAE website, and it successfully installed on my Ubuntu 17.04 system. Now, I created a folder with the name first-app
with the files first-app.py
and app.yaml
.
Whenever I try to run dev_appserver.py first-app
, I get the following error:
Traceback (most recent call last):
File "/usr/bin/dev_appserver.py", line 11, in <module>
import bootstrapping.bootstrapping as bootstrapping
File "/usr/lib/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 9, in <module>
import setup
ModuleNotFoundError: No module named 'setup'
I have both python 2.7 and python 3.5 installed and the default python is 2.7.13.
Below is the content of first-app.py
:
import webapp2
class Mainpage(webapp2.RequestHandler):
def get(self):
self.response.write("Hello World")
app=webapp2.WSGIApplication([('/', Mainpage), ], debug=True)
and the content of app.yaml
file is:
runtime: python
api_version: 1
threadsafe: true
handlers:
- url: /
script: first-app.app
- url: /index\.html
script: home.app
What should I do to make it work?