[英]Google App Engine (Python 2.7) Win 10 ImportError: No module named appengine.api
I have a problem trying to run a python project, I already installed Python 2.7 and Google Cloud SDK (I followed up the instructions in https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python ), but I get the following error: 我在尝试运行python项目时遇到问题,我已经安装了Python 2.7和Google Cloud SDK(我按照https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python中的说明进行了操作),但是出现以下错误:
ImportError: No module named appengine.api ImportError:没有名为appengine.api的模块
Also I set up the enviroment variables: 我也设置了环境变量:
My OS is Windows 10 我的操作系统是Windows 10
If you execute the project in local, you would get that error(google.appengine.api error). 如果您在本地执行项目,则会收到该错误(google.appengine.api错误)。 Basically it has to be executed on a server.
基本上,它必须在服务器上执行。
The server can be started using your terminal. 可以使用您的终端启动服务器。
1) Go to the project path(root folder of all files in the project,eg: appengine) 1)转到项目路径(项目中所有文件的根文件夹,例如:appengine)
2) start the server using $ dev_appserver.py app.yaml. 2)使用$ dev_appserver.py app.yaml启动服务器。 It starts server at localhost port 8000 as the default one.
它以默认端口localhost 8000启动服务器。
3) In the server start depends on the handler and its path specified (like '/' or '/testjob') try localhost:8000/ or localhost:8000/testjob 3)在服务器中启动取决于处理程序及其指定的路径(例如“ /”或“ / testjob”),请尝试localhost:8000 /或localhost:8000 / testjob
4) All the logs written in the program will be shown in the terminal. 4)程序中写入的所有日志将显示在终端中。 For logs try using 'logging' module , make sure to mention the logging level else basic level logs are not shown
对于日志,请尝试使用“日志记录”模块,请确保提及日志记录级别,否则不会显示基本级别的日志
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.