在OS X Lion上将GAE升级到1.7.6后,我遇到了一个错误,当我运行dev_appserver.py时无法解决。它在以前的版本中运行良好。最初错误说我需要使用pip安装PyObjC和PIL。现在,它说can't open file '/usr/local/bin/_python_runtime.py': [Errno 2] No such file or directory
。这是完整的错误:
INFO 2013-04-01 23:01:15,091 sdk_update_checker.py:244] Checking for updates to the SDK.
INFO 2013-04-01 23:01:15,660 sdk_update_checker.py:272] The SDK is up to date.
INFO 2013-04-01 23:01:15,705 api_server.py:152] Starting API server at: http://localhost:50096
INFO 2013-04-01 23:01:15,721 dispatcher.py:98] Starting server "default" running at: http://localhost:8080
INFO 2013-04-01 23:01:15,759 admin_server.py:117] Starting admin server at: http://localhost:8000
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/bin/_python_runtime.py': [Errno 2] No such file or directory
ERROR 2013-04-01 23:01:15,785 http_runtime.py:221] unexpected port response from runtime ['']; exiting the development server
INFO 2013-04-01 23:01:16,775 api_server.py:517] Applying all pending transactions and saving the datastore
INFO 2013-04-01 23:01:16,775 api_server.py:520] Saving search indexes
Exception in thread Thread-1 (most likely raised during interpreter shutdown)
我发现了一篇关于这个here的类似帖子,但是它出现在Windows 7机器上,并且看起来他没有找到解决方案(或者他确实没有跟进)。有什么想法吗?
编辑:它适用于GoogleAppEngineLauncher GUI,但不适用于命令行。不知道为什么。
答案 0 :(得分:5)
从我对Fat Lotus的回复中,这对我有用:
我再次更新了GAE Launcher,重新创建了符号链接,现在它工作正常。 /usr/local/bin/_python_runtime.py
链接到的当前符号链接为/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/_python_runtime.py
答案 1 :(得分:2)
我也遇到过这个问题(与Homebrew安装有关);我已经设法通过使用以下内容来解决问题:
ln -s /usr/local/Cellar/google-app-engine/1.7.5/share/google-app-engine/_python_runtime.py /usr/local/bin/_python_runtime.py
答案 2 :(得分:0)
我在_python_runtime.py中找不到相同的错误。这是因为首先将应用程序复制到本地驱动器而未运行GoogleAppEngineLauncher。
请务必仔细阅读错误消息,因为我最初没有阅读所有错误消息。从本地磁盘运行安装程序解决了这个问题,至少对我而言。