在Mac OS X 10.6上使用Google App Engine SDK和Python 2.7 [英] Using Google App Engine SDK with Python 2.7 on Mac OS X 10.6

查看:145
本文介绍了在Mac OS X 10.6上使用Google App Engine SDK和Python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在装有Python 2.6的Mac Snow Leopard上运行Python 2.7。根据这个答案,从Python.org运行Python 2.7 mpkg安装程序应该让我到那里。

我需要这样做的原因是我试图为Python 2.7运行时运行Google App Engine SDK。



安装Python 2.7后,我仍在GAE服务器日志中收到以下警告:


警告:您正在使用比
生产运行时环境(2.7)旧的Python运行时(2.6)。


我还需要做些什么才能让GAE SDK识别新的Python版本?

编辑2:



运行:

  $ sudo find / -name python2.7 

我得到:

  /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
/ Library /Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/bin/python2.7

根据我进入 GoogleAppLauncher - >首选项的答案,并设置Python路径到每个这些路径,并且每次获取exac同样的错误。
$ b


使用以下标志运行dev_appserver:
--admin_console_server = --port = 8081 Python命令:/ Library / Frameworks / Python.framework / Versions / 2.7 2011-11-14
16:12:24.726 GoogleAppEngineLauncher [57590:203] *** NSTask:任务
为路径创建'/Library/Frameworks/Python.framework/版本/ 2.7'
失败:22,无效参数。终止临时过程。


另一个奇怪的事情是,它总是试图解决相同的路径,无论我插入哪一个;它总是回复到 /Library/Frameworks/Python.framework/Versions/2.7



编辑3:

好的,在重复输入路径到prefs字段后,我终于清除了它,现在它指向正确的位置: p>

 使用以下标志运行dev_appserver:
--admin_console_server = --port = 8081
Python命令:/ usr / local / bin / python2.7


解决方案

打开GAE启动程序首选项,并将 Python路径选项设置为全新安装的Python 2.7,对于您的情况 /usr/local/bin/python2.7


I need to run Python 2.7 on my Mac Snow Leopard, which has Python 2.6 installed. According to this answer, running the Python 2.7 mpkg installer from Python.org should get me there.

The reason I need to do this is that I'm trying to run the Google App Engine SDK for the Python 2.7 runtime.

After installing Python 2.7, I'm still getting the following warning in my GAE server log:

Warning: You are using a Python runtime (2.6) that is older than the production runtime environment (2.7).

What else must I do to get the GAE SDK to recognize the new Python version?

EDIT 2:

Running:

$ sudo find / -name python2.7

I get:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
/usr/local/bin/python2.7

According to the answers I went into GoogleAppLauncher -> Preferences and set the Python path to each of these, and each time I get the exact same error.

Running dev_appserver with the following flags: --admin_console_server= --port=8081 Python command: /Library/Frameworks/Python.framework/Versions/2.7 2011-11-14 16:12:24.726 GoogleAppEngineLauncher[57590:203] *** NSTask: Task create for path '/Library/Frameworks/Python.framework/Versions/2.7' failed: 22, "Invalid argument". Terminating temporary process.

Another Wierd thing is, it always tries to resolve to the same path, no matter which of those I plug in; It always reverts to /Library/Frameworks/Python.framework/Versions/2.7

EDIT 3:

OK, after entering the paths into the prefs field repeatedly, I finally just cleared it out, and somehow it's now pointing to the right place:

Running dev_appserver with the following flags:
    --admin_console_server= --port=8081
Python command: /usr/local/bin/python2.7

解决方案

Open the GAE launcher preferences and set the Python Path option to the fresh installed Python 2.7, in your case /usr/local/bin/python2.7 .

这篇关于在Mac OS X 10.6上使用Google App Engine SDK和Python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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