tschoonj / xraylib

A library for X-ray matter interaction cross sections for X-ray fluorescence applications
https://github.com/tschoonj/xraylib/wiki
Other
120 stars 54 forks source link

xraylib under Debian 11 Bullseye #190

Closed foldermann closed 2 years ago

foldermann commented 2 years ago

When installing xraylib under Debian 11 (assuming there is a deb for bullsye): sources.list deb [arch=amd64] http://xmi-apt.tomschoonjans.eu/debian bullseye stable deb-src http://xmi-apt.tomschoonjans.eu/debian bullseye stable the installation with sudo apt-get install libxrl11 libxrl11-dev libxrlf03-11 libxrl-perl python3-libxrl11 works and the packages are installed. Nevertheless an import import xraylib under python3 fails with ModuleNotFoundError: No module named 'xraylib'

using the Buster Deb: sources.list deb [arch=amd64] http://xmi-apt.tomschoonjans.eu/debian buster stable deb-src http://xmi-apt.tomschoonjans.eu/debian buster stable

installation works as well but import xraylib fails with

>>> import xraylib
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xraylib.py", line 17, in swig_import_helper
    return importlib.import_module(mname)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named '_xraylib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/xraylib.py", line 20, in <module>
    _xraylib = swig_import_helper()
  File "/usr/lib/python3/dist-packages/xraylib.py", line 19, in swig_import_helper
    return importlib.import_module('_xraylib')
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_xraylib'

is there any chance to get this running without downgrading to Debian 10?

tschoonj commented 2 years ago

I created new builds for bullseye, which should fix the problem. Thanks for bringing this to my attention!

foldermann commented 2 years ago

Perfect - after a sudo apt update && sudo apt upgrade everything is running smoothly again! Thanks for the light-speed reply and fix!