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



---------------------------------------------------------------------------
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'

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to