Using Google App Engine SDK with Python 2.7 on Mac OS X 10.6

徘徊边缘 提交于 2019-12-02 21:59:18

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 .

Came across this question looking for a solution to the same dilemma regarding Mac, GAE and Python.

One comment I would like to make regarding setting the Python path using GAE Preferences. I notice you mention that you had a problem setting the Python path using the Preferences. I discovered that after editing the path, you have to press Enter. Otherwise, the path doesn't get updated. This might explain the weirdness you were mentioning when trying to edit the path field.

I installed python 2.7.x from macports. I see this:

$ python --version
Python 2.7.2

$ which python
/opt/local/bin/python

So, in the preferences for GoogleAppEngineLauncher.app I set the python path to:

/opt/local/bin/python

In the console log, I see this:

*** Running dev_appserver with the following flags:
    --admin_console_server= --port=8081
Python command: /opt/local/bin/python

I still see some errors about libraries, in particular Can't open zipfile...setuptools but simple stuff at least seems to work.

Good luck!

I am not sure if it helps, but instead of using the binaries from Python, I used MacPorts http://www.macports.org/ and installed the Python 2.7 runtime:

sudo port install python27
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!