简体   繁体   English

使用python的OSX Lion上的Google应用引擎失败

[英]Google app engine fails on OSX Lion with python

I am using Google App Engine and just updated to Lion on my mac. 我正在使用Google App Engine,并在我的Mac上更新为Lion。 I am using eclipse with Pydev. 我和Pydev一起使用eclipse。 Now as soon as I updated I have been unable to launch the dev server. 现在,一旦我更新,我就无法启动开发服务器。 I get the stack trace below. 我得到下面的堆栈跟踪。 Anyone else with the same problem? 其他人有同样的问题吗?

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

I ended up uninstalling GAE and eclipse and reinstalling. 我最终卸载了GAE和eclipse并重新安装。 It works now. 它现在有效。

From looking at the stack trace it seems like the PyDev plugin was the culprit 从查看堆栈跟踪看起来PyDev插件似乎是罪魁祸首

I had the same problem, but I just pointed my library stuff to 2.7 in the same root, eg /System/Library/Frameworks/Python.framework/Versions/2.6/... /System/Library/Frameworks/Python.framework/Versions/2.7/... and everything worked fine again. 我有同样的问题,但我只是将我的库内容指向同一根中的2.7,例如/System/Library/Frameworks/Python.framework/Versions/2.6 / ... /System/Library/Frameworks/Python.framework/版本/ 2.7 / ...一切都运行良好。 Looks like the binaries 2.6 was built on are not compiled for Lion. 看起来构建的二进制文件2.6不是为Lion编译的。 Found in Preferences-> PyDev-> Interpreter - Python-> Libraries 在Preferences-> PyDev-> Interpreter - Python-> Libraries中找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM