python导入错误“没有名为appengine.ext的模块" [英] python import error "No module named appengine.ext"

查看:27
本文介绍了python导入错误“没有名为appengine.ext的模块"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行此代码后,我发现导入错误:-

after runing this code,I found import error:-

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.out.write('Hello, webapp World!')

application = webapp.WSGIApplication([('/', MainPage)],debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()

如何使用 google.apengine.ext

how to use google.apengine.ext

推荐答案

看起来 App Engine SDK 没有安装,或者至少 Python 运行时找不到它.

It looks like the App Engine SDK is not installed, or at least the Python runtime cannot find it.

阅读并按照此处的说明操作:https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python

read and follow the instructions here: https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python

他们告诉您如何安装适用于 Python 的 App Engine SDK.

They tell you, how to install App Engine SDK for Python.

这篇关于python导入错误“没有名为appengine.ext的模块"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆