Hi,
in a previous work, I made a c++ library usable from a python program (using the cython tool). It works perfectly but has to be run from the command line.
Now I’m trying to develop a module that would allow to launch automatically some features of this library from the Slicer interface.
I manage to import the python code of my library (by adding the path in sys.path) but this code imports a .so/.pyx library compiled with cython and which does not work. (I don’t know if I’m making myself understood …)
The console error when I start Slicer :
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/llafitte007/Slicer-4.11.20210226-linux-amd64/lib/Python/lib/python3.6/imp.py", line 170, in load_source
module = _exec(spec, sys.modules[name])
File "<frozen importlib._bootstrap>", line 618, in _exec
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/llafitte007/__CODE__/primetimeire/SlicerExtensions/Primetime/NeedlesCoordinates/NeedlesCoordinates.py", line 23, in <module>
from NeedlesExtraction import NeedlesExtraction, PrimetimeConfiguration, Image
File "/home/llafitte007/__CODE__/primetimeire/NeedlesExtraction.py", line 6, in <module>
from wrappers import PyIrenaUtils
File "/home/llafitte007/__CODE__/primetimeire/wrappers/__init__.py", line 1, in <module>
from .PyIrena import PyIrena, PyIrenaPatient, PyIrenaUtils
File "/home/llafitte007/__CODE__/primetimeire/wrappers/PyIrena/__init__.py", line 8, in <module>
from PyIrena import PyIrena, PyIrenaPatient, PyIrenaUtils, ptype, ConfigKey
ModuleNotFoundError: No module named 'PyIrena'
Someone could help me ?
To resume, I tried to use a .so/.pyx library imported from a file I imported in a Slicer module …