在OS X Lion上将GAE升级到1.7.6后,我得到一个错误,当我运行dev_appserver.py时无法解决。它在以前的版本中工作正常。最初的错误说我需要安装PyObjC和PIL,我使用pip。现在,它说can't open file '/usr/local/bin/_python_runtime.py': [Errno 2] No such file or directory
。以下是完整的错误:dev_appserver.py给我一个错误
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,但不适用于命令行。不知道为什么。
从命令行运行时,你的默认python是什么? –
你是指python路径吗? 'python'给出'usr/local/bin/python'。我有一个virtualenv设置,但是我在我的系统安装中运行这个。 – phsteve
你说它从启动程序运行良好,但不是从命令行运行,这可能表明您正尝试从命令行运行dev服务器(无论您如何输入python),这对于新的dev服务器无效。例如,我发现过去我无法从virtualenv链接的python运行dev服务器。也许python的版本不被支持(如果我尝试用pypy运行dev服务器,我会得到端口错误) –