* [lttng-dev] BabelTrace 1.5.8 Error
@ 2023-10-10 21:33 Smet, Jonathan A. [US-US] via lttng-dev
2023-10-10 22:03 ` Michael Jeanson via lttng-dev
0 siblings, 1 reply; 2+ messages in thread
From: Smet, Jonathan A. [US-US] via lttng-dev @ 2023-10-10 21:33 UTC (permalink / raw)
To: lttng-dev
[-- Attachment #1.1: Type: text/plain, Size: 1190 bytes --]
Hello,
I found this email in the README of 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
[-- Attachment #1.2: Type: text/html, Size: 8377 bytes --]
[-- Attachment #2: babeltrace_error.txt --]
[-- Type: text/plain, Size: 2195 bytes --]
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/usr/lib/python3/dist-packages/babeltrace/babeltrace.py in swig_import_helper()
25 try:
---> 26 return importlib.import_module(mname)
27 except ImportError:
/usr/lib/python3.7/importlib/__init__.py in import_module(name, package)
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
/usr/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)
/usr/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)
/usr/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'babeltrace._babeltrace'
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_87673/2295446521.py in <module>
----> 1 import babeltrace
/usr/lib/python3/dist-packages/babeltrace/__init__.py in <module>
21 # THE SOFTWARE.
22
---> 23 from .babeltrace import *
24
25 __version__ = '1.5.8'
/usr/lib/python3/dist-packages/babeltrace/babeltrace.py in <module>
27 except ImportError:
28 return importlib.import_module('_babeltrace')
---> 29 _babeltrace = swig_import_helper()
30 del swig_import_helper
31 elif _swig_python_version_info >= (2, 6, 0):
/usr/lib/python3/dist-packages/babeltrace/babeltrace.py in swig_import_helper()
26 return importlib.import_module(mname)
27 except ImportError:
---> 28 return importlib.import_module('_babeltrace')
29 _babeltrace = swig_import_helper()
30 del swig_import_helper
/usr/lib/python3.7/importlib/__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
ModuleNotFoundError: No module named '_babeltrace'
[-- Attachment #3: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lttng-dev] BabelTrace 1.5.8 Error
2023-10-10 21:33 [lttng-dev] BabelTrace 1.5.8 Error Smet, Jonathan A. [US-US] via lttng-dev
@ 2023-10-10 22:03 ` Michael Jeanson via lttng-dev
0 siblings, 0 replies; 2+ messages in thread
From: Michael Jeanson via lttng-dev @ 2023-10-10 22:03 UTC (permalink / raw)
To: Smet, Jonathan A. [US-US], lttng-dev
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
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-10 22:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 21:33 [lttng-dev] BabelTrace 1.5.8 Error Smet, Jonathan A. [US-US] via lttng-dev
2023-10-10 22:03 ` Michael Jeanson via lttng-dev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox