lldb-tools / vim-lldb

Other
22 stars 10 forks source link

Doesn't work with brewed python #2

Open keith opened 3 years ago

keith commented 3 years ago

If vim / neovim is installed via brew, it uses python installed from brew, which fails to import lldb from Xcode 12. Example failure:

% /usr/local/Cellar/python@3.8/3.8.5/bin/python3
Python 3.8.5 (default, Aug 31 2020, 13:38:53)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lldb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb'
>>> import sys
>>> sys.path.append("/Applications/Xcode-12.0.0-GM2.app/Contents/SharedFrameworks/LLDB.framework/Resourc
es/Python3")
>>> import lldb
Fatal Python error: _PyInterpreterState_Get(): no current thread state
Python runtime state: unknown

zsh: abort      /usr/local/Cellar/python@3.8/3.8.5/bin/python3
themightyoarfish commented 3 years ago

According to the readme, it needs python 2 :(

keith commented 2 years ago

It turns out the issue is lldb's macOS python support in general only supports the version shipped with Xcode https://lldb.llvm.org/resources/caveats.html#lldb-in-xcode-on-macos (or maybe at least only the version lldb was used to build with)