[...]
Python 3.11.5
pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
[...]
Successfully installed CPyCppyy-1.12.13 cppyy-3.0.0 cppyy-backend-1.14.11 cppyy-cling-6.28.0
[...]
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.11/site-packages/cppyy/__init__.py", line 80, in <module>
from ._cpython_cppyy import *
File "/usr/local/lib/python3.11/site-packages/cppyy/_cpython_cppyy.py", line 21, in <module>
c = loader.load_cpp_backend()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/cppyy_backend/loader.py", line 92, in load_cpp_backend
raise RuntimeError("could not load cppyy_backend library, details:\n%s" %
RuntimeError: could not load cppyy_backend library, details:
libcppyy_backend.so: cannot open shared object file: No such file or directory
/usr/local/lib/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so: cannot open shared object file: No such file or directory
/usr/local/lib/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.cpython-311-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory
libcppyy_backend.cpython-311-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory
This is because the shared object ends up in a different location (note the lib64 instead of lib at the beginning):
Fedora useslib for architecture-independent python modules and lib64 for extensions modules and the like, not making both folders point to the same contents via a symlink. After moving it using mv /usr/local/lib64/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so /usr/local/lib/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so, the cppyy installation continues to work as usual. An easy fix for this might be throwing the lib64 folder also into the default search path (or only if its no symlink to lib).
It seems that the site-packages/cppyy_backend folder is pieced together from different packages (see the following listing of packages and their corresponding files), which might be related to this.
# pip uninstall cppyy cppyy-backend cppyy-cling CPyCppyy
Found existing installation: cppyy 3.0.0
Uninstalling cppyy-3.0.0:
Would remove:
/usr/local/lib/python3.11/site-packages/cppyy-3.0.0.dist-info/*
/usr/local/lib/python3.11/site-packages/cppyy/*
Proceed (Y/n)? y
Successfully uninstalled cppyy-3.0.0
Found existing installation: cppyy-backend 1.14.11
Uninstalling cppyy-backend-1.14.11:
Would remove:
/usr/local/lib/python3.11/site-packages/cppyy_backend-1.14.11.dist-info/*
/usr/local/lib64/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so
Proceed (Y/n)? y
Successfully uninstalled cppyy-backend-1.14.11
Found existing installation: cppyy-cling 6.28.0
Uninstalling cppyy-cling-6.28.0:
Would remove:
/usr/local/bin/cling-config
/usr/local/bin/cppyy-generator
/usr/local/bin/genreflex
/usr/local/bin/rootcling
/usr/local/lib/python3.11/site-packages/cppyy_backend/*
/usr/local/lib/python3.11/site-packages/cppyy_cling-6.28.0.dist-info/*
Proceed (Y/n)? y
Successfully uninstalled cppyy-cling-6.28.0
Found existing installation: CPyCppyy 1.12.13
Uninstalling CPyCppyy-1.12.13:
Would remove:
/usr/include/python3.11/CPyCppyy/API.h
/usr/include/python3.11/CPyCppyy/CommonDefs.h
/usr/include/python3.11/CPyCppyy/DispatchPtr.h
/usr/include/python3.11/CPyCppyy/PyException.h
/usr/include/python3.11/CPyCppyy/PyResult.h
/usr/include/python3.11/CPyCppyy/Reflex.h
/usr/include/python3.11/CPyCppyy/TPyArg.h
/usr/local/lib64/python3.11/site-packages/CPyCppyy-1.12.13.dist-info/*
/usr/local/lib64/python3.11/site-packages/libcppyy.cpython-311-x86_64-linux-gnu.so
Proceed (Y/n)? y
Successfully uninstalled CPyCppyy-1.12.13
In a blank Fedora container,
pip install
ing cppyy yields a non-working setup:This is because the shared object ends up in a different location (note the
lib64
instead oflib
at the beginning):Fedora uses
lib
for architecture-independent python modules andlib64
for extensions modules and the like, not making both folders point to the same contents via a symlink. After moving it usingmv /usr/local/lib64/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so /usr/local/lib/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so
, thecppyy
installation continues to work as usual. An easy fix for this might be throwing thelib64
folder also into the default search path (or only if its no symlink tolib
).It seems that the
site-packages/cppyy_backend
folder is pieced together from different packages (see the following listing of packages and their corresponding files), which might be related to this.