Google App Engine在OSX Lion上使用Python失败
我在使用Google App Engine,并且刚刚把我的Mac更新到了Lion系统。我在用Eclipse这个软件,里面装了Pydev插件。现在一更新系统,我就无法启动开发服务器了。下面是我遇到的错误信息。有没有其他人也遇到同样的问题?
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 76, in <module>
run_file(__file__, globals())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 72, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 142, in <module>
import tempfile
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tempfile.py", line 34, in <module>
from random import Random as _Random
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/random.py", line 45, in <module>
from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/math.so, 2): Symbol not found: __PyLong_AsScaledDouble
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/math.so
2 个回答
0
我也遇到过同样的问题,不过我把我的库文件指向了同一个根目录下的2.7版本,比如说: /System/Library/Frameworks/Python.framework/Versions/2.6/... /System/Library/Frameworks/Python.framework/Versions/2.7/... 这样一来,一切又正常工作了。看起来2.6版本的二进制文件是没有为Lion系统编译的。你可以在设置里找到这个选项,路径是:Preferences-> PyDev-> Interpreter - Python-> Libraries。
1
我最后选择卸载了GAE和Eclipse,然后重新安装了一遍。现在可以正常使用了。
从查看错误信息来看,似乎是PyDev这个插件出了问题。