Skip to content

PyInstaller: FileNotFoundError: cilacc library not found #2896

@samtygier-stfc

Description

@samtygier-stfc

Summary

When building a MI package with pyinstaller, the libcilacc.so from cil is no longer being picked up.

This seems to be a change in cil 25.0.0 vs 24.0.0. Within the conda environment the library has moved from
~/miniforge3/envs/mantidimaging-dev/lib/libcilacc.so
to
~/miniforge3/envs/mantidimaging-dev/lib/python3.12/site-packages/cil/lib/libcilacc.so

Steps To Reproduce

Build the pyinstaller package, from the packaging directory run
python PackageWithPyInstaller.py
then try to run the package
./dist/MantidImaging/MantidImaging

Current Behaviour

With cil 25.0.0 I get

Traceback (most recent call last):
  File "cil/framework/cilacc.py", line 28, in <module>
StopIteration

During handling of the above exception, another exception occurred:
...
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
  File "cil/framework/cilacc.py", line 30, in <module>
FileNotFoundError: cilacc library not found
[PYI-75123:ERROR] Failed to execute script '__main__' due to unhandled exception

Expected Behaviour

Builds working package

Context

Current main, on linux

Failure Logs

Screenshot(s)

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions