在Windows操作系统中运行python中的Google应用程序时出错 [英] error in running Google apps in python in windows OS

查看:118
本文介绍了在Windows操作系统中运行python中的Google应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在google app引擎中

在运行应用程序时出错

日志中的googleappengine



2012-04-21 13:24:04运行命令:['C:\Python32\pythonw .exe','C:\程序文件\Google\google_appengine\dev_appserver.py','--admin_console_server =','--port = 8080','C:\udacity\googleapps\ hello-udacity']
Traceback(最近一次调用最后一次):
文件C:\Program Files\Google\google_appengine\dev_appserver.py,第125行,位于
run_file( file ,globals())
文件C:\程序文件\Google\google_appengine\dev_appserver.py,第121行,在run_file中
execfile(script_path,globals_)
NameError:全局名称'execfile'未定义
2012-04-21 13:24:07(进程已退出,代码为1)

解决方案

您似乎在运行Python 3.2(您的Python可执行文件位于此路径'C:\ Python32 \pythonw.exe')。

Google AppEngine目前需要Python 2.5或2.7,请参阅这篇文章。您需要下载Python 2.7,将其安装在并行目录中,并将其设置为默认可执行文件。

您可能会发现在运行多个版本的Python


in google app engine

get error in runing the appicaition

in logs of googleappengine

2012-04-21 13:24:04 Running command: "['C:\Python32\pythonw.exe', 'C:\Program Files\Google\google_appengine\dev_appserver.py', '--admin_console_server=', '--port=8080', 'C:\udacity\googleapps\hello-udacity']" Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 125, in run_file(file, globals()) File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 121, in run_file execfile(script_path, globals_) NameError: global name 'execfile' is not defined 2012-04-21 13:24:07 (Process exited with code 1)

解决方案

You appear to be running Python 3.2 (your Python executable is on this path 'C:\Python32\pythonw.exe').

Google AppEngine requires Python 2.5 or 2.7 at this stage, see this article. You need to download Python 2.7, install it in a parallel directory, and make it the default executable.

You may find it helpful to read this answer on running more than one version of Python

这篇关于在Windows操作系统中运行python中的Google应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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