ModuleNotFoundError when starting lldb

Asked by Johan Emmanuel

Whenever I start lldb in Ubuntu 22.04, I get a message saying:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'

but the program continues to run fine.

I have the packages python3-lldb and python3-lldb-14 already installed.
Is this a bug in the package or do I need to install something else?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For diagnostic purposes please provide the output that you receive for the following commands:

uname -a
lsb_release -crid
lldb --version
python --version
dpkg -l | grep lldb

Revision history for this message
Johan Emmanuel (johan2403) said :
#2

$ uname -a
Linux johan-dev 5.15.0-1006-raspi #6-Ubuntu SMP PREEMPT Mon Apr 25 12:50:48 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

$ 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

$ python3 --version
Python 3.10.4

$ dpkg -l | grep lldb
ii liblldb-14 1:14.0.0-1ubuntu1 arm64 Next generation, high-performance debugger, library
ii lldb:arm64 1:14.0-55~exp2 arm64 Next generation, high-performance debugger
ii lldb-14 1:14.0.0-1ubuntu1 arm64 Next generation, high-performance debugger
ii python3-lldb 1:14.0-55~exp2 arm64 Next generation, high-performance debugger, python lib
ii python3-lldb-14 1:14.0.0-1ubuntu1 arm64 Next generation, high-performance debugger, python3 lib

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is the output of

ls -ld /usr/lib/llvm-14/lib/python3.10/dist-packages/ll*
ls -l /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/em*

Revision history for this message
Johan Emmanuel (johan2403) said :
#4

$ ls -ld /usr/lib/llvm-14/lib/python3.10/dist-packages/ll*
drwxr-xr-x 5 root root 4096 May 7 09:47 /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb

$ ls -l /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/em*
-rw-r--r-- 1 root root 4415 Mar 24 13:24 /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb/embedded_interpreter.py

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#5

Meanwhile I had the time to set up a test system and I can confirm that I see the same error.
The command
python3 -c 'import lldb.embedded_interpreter'
fails with the same "No module named 'lldb.embedded_interpreter'" error.

I am a bit puzzled about the directory name /usr/lib/llvm-14/lib/python3.10/dist-packages/lldb and after moving all contents into /usr/lib/llvm-14/lib/python3/dist-packages/lldb the lldb command does not show the import error any more, and the "python import..." does not fail any more.

My assumption is that there is a packaging error that puts the files into a wrong directory. As far as I can see in Debian the files are in the same location, but I do not have a Debian system available for testing, so I cannot verify whether the package works on Debian or if Debian shows similar errors.

I suggest that you create a bug report.

Can you help with this problem?

Provide an answer of your own, or ask Johan Emmanuel for more information if necessary.

To post a message you must log in.