Closed torokati44 closed 8 months ago
https://github.com/wlav/cppyy/issues/191 is possibly related.
python3 -m pip install --user --upgrade cppyy-backend==1.15.0
The difference between .1 and .0 is that the former makes sure that cppyy-cling
and cppyy-backend
install in the same location, otherwise loader.py
can not find cppyy_backend.so
(that's the issue in #191): Fedora seems to be one of the few platforms that have a different purelib
from platlib
; on most other installations, they're the same.
All that said ... cppyy-backend
uses PEP517, meaning that the installation works by creating a wheel in a separated build environment, followed by pip
installing from that wheel. Wheels do not have absolute locations, but rather have placeholders at the start of the directories, such as "platlib" and "purelib" that are then filled in from Python's sysconfig. By design then, cppyy-backend
thus does not control the final installation, that's up to pip
.
For your platform, what do these show:
$ python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])'
$ python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'
And what does the wheel have:
$ unzip -l `python -m pip cache list cppyy_backend --format=abspath |& grep 1.15.1`
python3 -m pip install --user --upgrade cppyy-backend==1.15.0
This worked, thank you!
The command outputs you asked for:
attila ~ $ python -c 'import sysconfig; print(sysconfig.get_paths()["platlib"])'
/usr/local/lib64/python3.12/site-packages
attila ~ $ python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'
/usr/local/lib/python3.12/site-packages
python3 -m pip cache list cppyy_backend --format=abspath
does not list 1.15.1 for some reason.
I'm able to reproduce it now: when not in a virtual environment, then the temporary copy to the alternative path during build of the wheel goes into /usr/local/lib
. Will fix and re-release shortly.
Great, thank you!
3.1.2 should have this fixed.
Can confirm, python3 -m pip install --user --upgrade cppyy-backend==1.15.2
and python3 -m pip install --user --upgrade cppyy==3.1.2
works again!
Your quick response is much appreciated!
When running the following command, I get the error below.
The three lines before
[end of output]
are a bit sus, why is it trying to copy anything into anywhere else other than~/.local/lib/python3.12/site-packages/
when--user
is passed in?