1
我在努力尋找這一良好的文檔,而我還沒有能夠證實LLDB是否應該與Python 3工作或沒有(見LLDB-Python reference)在Mac上導入Python 3中的LLDB?
當試圖將其加載爲如下:
import sys
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
import lldb
這適用於蟒2(2.7是精確的),但是在Python 3(3.6是精確的),我得到一個錯誤(見結束全STRACK跟蹤):
ImportError: dynamic module does not define module export function (PyInit__lldb)
有什麼我可以做的,能夠在Python 3中導入lldb
?
完整的堆棧:
ImportError Traceback (most recent call last)
<ipython-input-3-2a8839b33e40> in <module>()
----> 1 import lldb
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py in <module>()
48 fp.close()
49 return _mod
---> 50 _lldb = swig_import_helper()
51 del swig_import_helper
52 else:
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py in swig_import_helper()
44 if fp is not None:
45 try:
---> 46 _mod = imp.load_module('_lldb', fp, pathname, description)
47 finally:
48 fp.close()
~/Virtualenvs/py36/lib/python3.6/imp.py in load_module(name, file, filename, details)
240 return load_dynamic(name, filename, opened_file)
241 else:
--> 242 return load_dynamic(name, filename, file)
243 elif type_ == PKG_DIRECTORY:
244 return load_package(name, filename)
~/Virtualenvs/py36/lib/python3.6/imp.py in load_dynamic(name, path, file)
340 spec = importlib.machinery.ModuleSpec(
341 name=name, loader=loader, origin=path)
--> 342 return _load(spec)
343
344 else:
ImportError: dynamic module does not define module export function (PyInit__lldb)