Re: [lttng-dev] BabelTrace 1.5.8 Error
Michael Jeanson via lttng-dev <[email protected]>
| Newsgroups | org.lttng.lists.lttng-dev |
|---|---|
| Message-ID | <[email protected]> |
On 2023-10-10 17:33, Smet, Jonathan A. [US-US] via lttng-dev wrote: > Hello, > > I found this email in the README of > https://github.com/efficios/babeltrace/tree/stable-1.5 > <https://github.com/efficios/babeltrace/tree/stable-1.5> > > I have a question regarding the usage of BabelTrace using version 1.5.8. I am > running on Ubuntu 20.04 and have installed or dependencies to use BabelTrace > with Python bindings: > > * sudo apt-get install lttng-tools > * sudo apt-get install lttng-modules-dkms > * sudo apt-get install liblttng-ust-dev > * sudo apt-get install python3-babeltrace > > When trying to import BabelTrace in a Python script with “import babeltrace”, > I receive the following error (more error output in the attached text file): > “ModuleNotFoundError: No module named 'babeltrace._babeltrace'” followed by > “ModuleNotFoundError: No module named '_babeltrace'”. > > My folder structure at /usr/lib/python3/dist-packages/babeltrace are as follows: > > * _babeltrace.cpython-38-x86_64-linux-gnu.so > * Babeltrace.py > * __init__.py > * /__pycache__ > > I’ve been trying to debug this issue for a couple of days, but am running into > a wall. I’ve decided to email your team in case you have seen this issue > before, or are able to spot a simple issue with my setup. > > Thank you, > > Jon Smet Hi Jon, The Ubuntu python3-babeltrace package contains a binary module (_babeltrace.cpython-38-x86_64-linux-gnu.so) built for the system's python 3.8 interpreter, in the log file you attached you seem to be using python 3.7 (/usr/lib/python3.7/importlib/__init__.py). You either need to use the system's python3 interpreter to use the packaged python3-babeltrace or build your own version of python3-babeltrace against the python 3.7 interpreter you are using. Regards, Michael _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev