a little addition to this, to reproduce you can do

```
guix pack -f squashfs bash python | \
xargs -I % sh -c 'apptainer exec % bash -c "echo \$GUIX_PYTHONPATH"'

guix pack -f squashfs bash python python2 | \
xargs -I % sh -c 'apptainer exec % bash -c "echo \$GUIX_PYTHONPATH"'
```

First one gives
/gnu/store/rxfshmxwk8pas52lpmhhnqys8apwynpr-profile/lib/python3.11/site-packages

Second one gives
/gnu/store/rxfshmxwk8pas52lpmhhnqys8apwynpr-profile/lib/python2.7/site-packages

Alexis

On 03/06/2025 10:01, Alexis Simon wrote:
Hello,

I have an issue with how the python path for libraries is defined in a guix pack. I build it with a manifest containing modules for both python 3 and python 2, so both versions are present.

When using the same manifest in guix shell there is no issue and GUIX_PYTHONPATH contains both paths to the v2 and v3 libraries: /gnu/store/14pr6n1m5a41pfp6ndhlwvv3kik0kylb-profile/lib/python2.7/site- packages /gnu/store/14pr6n1m5a41pfp6ndhlwvv3kik0kylb-profile/lib/ python3.11/site-packages

However in the squashfs container created by guix pack, I only get the v2 ones: /gnu/store/zyyccg6d11g22ihx46hhzgqb4kl0idsp-profile/lib/python2.7/site- packages

I'm wondering if there isn't some step missing in guix pack compared to guix shell.

Cheers,
Alexis



Reply via email to