TomographicImaging / CIL

A versatile python framework for tomographic imaging
https://tomographicimaging.github.io/CIL/
Apache License 2.0
97 stars 45 forks source link

OSError: libippcore.so.10 #1970

Closed samtygier-stfc closed 3 weeks ago

samtygier-stfc commented 4 weeks ago

Description

When importing cil.framework I get the following error:

# python -c "import cil.framework"                                                                                                                                                          
Traceback (most recent call last):                                                                                                                                                                                   
  File "<string>", line 1, in <module>                                                                                                                                                                               
  File "/opt/conda/envs/cil/lib/python3.12/site-packages/cil/framework/__init__.py", line 19, in <module>                                                                                                            
    from .cilacc import cilacc                                                                                                                                                                                       
  File "/opt/conda/envs/cil/lib/python3.12/site-packages/cil/framework/cilacc.py", line 33, in <module>                                                                                                              
    cilacc = ctypes.cdll.LoadLibrary(dll)                                                                                                                                                                            
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                            
  File "/opt/conda/envs/cil/lib/python3.12/ctypes/__init__.py", line 460, in LoadLibrary                                                                                                                             
    return self._dlltype(name)                                                                                                                                                                                       
           ^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                       
  File "/opt/conda/envs/cil/lib/python3.12/ctypes/__init__.py", line 379, in __init__                                                                                                                                
    self._handle = _dlopen(self._name, mode)                                                                                                                                                                         
                   ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                         
OSError: libippcore.so.10: cannot open shared object file: No such file or directory

I think this is happening due to an update to ipp from ipp 2021.12.1 intel_14 https://software.repos.intel.com/python/conda to ipp 2022.0.0 intel_808 https://software.repos.intel.com/python/conda

We have started seeing this in github actions tests today.

I can also reproduce in a clean miniforge docker

$ sudo docker run -it --rm condaforge/miniforge3 bash
(base) root@592b07cb34af:/# conda create --name cil -c conda-forge -c https://software.repos.intel.com/python/conda -c ccpi cil=24.2.0
(base) root@592b07cb34af:/# conda activate cil
(cil) root@592b07cb34af:/# python -c "import cil.framework"  

Environment

24.2.0 None 3.12.7 | packaged by conda-forge | (main, Oct 4 2024, 16:05:46) [GCC 13.3.0] linux

ericpre commented 3 weeks ago

I just had the same issue on linux (not windows) while following the installation instructions from https://github.com/TomographicImaging/CIL?tab=readme-ov-file#installation-of-cil:

conda create --name cil -c conda-forge -c https://software.repos.intel.com/python/conda -c ccpi cil=24.2.0

and came to the same conclusion independently - didn't think of checking the issue tracker! 😅 The cuprit is indeed with ipp 2022.0.0.

It works fine with pinning ipp:

conda create --name cil -c conda-forge -c https://software.repos.intel.com/python/conda -c ccpi cil=24.2.0 ipp=2021.12.1

On windows, cil is working fine with ipp 2021.12.1 .

gfardell commented 3 weeks ago

Thanks for letting us know. Adding ipp=2021.12 to the installation line will ensure you get the right version of the runtime libraries. We'll also change the conda recipe to explicitly pin the version - but this should be a good work around in the mean time.