-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'lldb.embedded_interpreter' #55575
Comments
@llvm/issue-subscribers-lldb |
We'll need a little bit more information. What platform are you on? How did you install lldb? |
I am running lldb in Ubuntu 22.04 LTS. Following is the platform information: $ uname -a
Linux ea22053d0460 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux I installed the development branch of lldb following this website (LLVM Ubuntu nightly packages): https://apt.llvm.org/ |
I think it is worthy to note that my ubuntu is running inside a container. |
I see the same behavior in LLDB 14 on Ubuntu 20.04 (not running in a container), installed with |
I had the same situation as @nlsandler - following the steps outlined in this bug report on launchpad.net: https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1972855 solved it for me. It appears that the issue is down to a mismatch in python paths. |
I suspect OP's issue is the same as mine. |
Same here. Win10 wsl2. After updating Ubuntu from 20.04 to 22.04, I found lldb still kept version 10 so I ran |
Thanks for the link, @tgfrerer |
with ubuntu 22.04 and swift 5.7 I had to:
before "swift repl" would work without errors. |
I'm on ubuntu22, installed lldb by apt. this works for me. Thanks! |
works for me on WSL2. thx! |
Same here on WSL2 with Ubuntu 22.04 with latest updates applied, lldb installed via apt. $ lldb --version
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
lldb version 14.0.0 $ lldb -P
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
/usr/lib/local/lib/python3.10/dist-packages
$ ls -l /usr/lib/local/lib/python3.10/dist-packages
ls: cannot access '/usr/lib/local/lib/python3.10/dist-packages': No such file or directory Workaround fix, thanks to #55575 (comment): $ sudo ln -s /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/* /usr/lib/python3/dist-packages/lldb/ |
If you aren't admin, you can work around this by setting your |
Same here with Ubuntu v22.10 / lldb v15.0.6 ;) lldb -P would give me:
Workaround using proper path for lldb v15 the correct path should use "llvm-xx" instead of "local", that was the only diff |
worked for me on WSL2, thanks! |
sudo ln -s /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/* /usr/lib/python3/dist-packages/lldb/ Thanks, and add |
The workaround works, but it would be great to fix this finally. This has been open for over a year and has wasted time for a lot of people. |
I just installed Swift 5.9 on Debian 12 (on a RPi Pico) and ran into this issue running the Swift REPL. Eventually I found this issue. I tried the above command to link the bits, but now I get this:
UTA: This is with lldb-15 and python3-lldb-15. |
That type was removed in 70599d7, which was first present in lldb 16. I can't tell who's throwing that error, could be a mismatch between the version swift expects to find and the installed library version. |
export PYTHONPATH=/lib/llvm-14/lib/python3.10/dist-packages:$PYTHONPATH |
There's a bug report on Debian 12. You can append export PYTHONPATH="/usr/lib/llvm-14/lib/python3.11/dist-packages/:$PYTHONPATH" to your |
Even with the workaround, this is quite annoying when trying to automate LLDB installation, because the LLDB version and Python versions differ between Ubuntu versions, so you have to script detecting the installed versions somehow. Is this something LLDB developers can fix or is it a packaging issue? |
Both... You can commonly work around this by switching to the LLDB version that does not have that module any more sudo apt install lldb-16
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-16 50 fixed that for me on newer systems and if that version isn't available (older systems) sudo apt install lldb-15
sudo update-alternatives --install /usr/bin/lldb lldb /usr/bin/lldb-15 50
export PYTHONPATH="/usr/lib/llvm-15/lib/python3.10/dist-packages/:$PYTHONPATH"
echo 'export PYTHONPATH="/usr/lib/llvm-15/lib/python3.10/dist-packages/:$PYTHONPATH"' >> ~/.bashrc |
lldb is already the newest version (1:15.0-55~20220216125911.2).
The text was updated successfully, but these errors were encountered: