开发者

Problems With Aptana Studio (and/or Python) under Lion

开发者 https://www.devze.com 2023-04-01 12:11 出处:网络
After installing Lion, Aptana has stopped working -- I can no longer run any Python开发者_运维问答 code, despite me failing to find any other problems with Python my system.I\'ve tried restoring defau

After installing Lion, Aptana has stopped working -- I can no longer run any Python开发者_运维问答 code, despite me failing to find any other problems with Python my system. I've tried restoring defaults in Aptana, re-installing and looking for any missing references in Aptana to python components.

Running a simple "hello world" .py script generates a console message:

Traceback (most recent call last):
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/runfiles.py", line 159, in <module>
    main()
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/runfiles.py", line 25, in main
    import pydev_runfiles
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/pydev_runfiles.py", line 5, in <module>
    import pydev_runfiles_unittest
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/pydev_runfiles_unittest.py", line 6, in <module>
    import pydev_runfiles_xml_rpc
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/pydev_runfiles_xml_rpc.py", line 1, in <module>
    from pydev_imports import xmlrpclib
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/pydev_imports.py", line 14, in <module>
    from _pydev_SimpleXMLRPCServer import SimpleXMLRPCServer
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.2.1.2011073123/pysrc/_pydev_SimpleXMLRPCServer.py", line 116, in <module>
    import BaseHTTPServer
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 81, in <module>
    import mimetools
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/mimetools.py", line 6, 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
  Expected in: flat namespace
 in /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/math.so


Have you tried removing your interpreter and adding it again (that way PyDev would update your PYTHONPATH?

It seems like the problem is that the math.so is not compatible with the latest changes in Lion (so, maybe in the update for Lion it got to 2.7 and you're still with 2.6 in the PYTHONPATH configure in Eclipse?)

For me, a better choice would be using an interpreter downloaded from python.org (where you have more control and don't need to rely on what Mac gives you) and configure the python from python.org.

See: http://pydev.org/manual_101_interpreter.html

0

精彩评论

暂无评论...
验证码 换一张
取 消