No need to apologize, this is extremely helpful as you managed to pinpoint the problem.
Which I guess stems from how this function defines the env
https://codeberg.org/guix/guix/src/commit/eb2f2e0c1a25f5688881f959a03290299ece13bf/guix/scripts/pack.scm#L311

I don't think I understand enough to try and fix this myself so I'll open an issue for it.

Best,
Alexis

On 03/06/2025 22:48, Rutherther wrote:
Alexis Simon <[email protected]> writes:

Thanks a lot for the lead, it seems indeed that this bash profile is not
loaded. You're right that the GUIX_PYTHONPATH is properly defined in the
profile file.
Although I don't know yet where the current python2 path comes from if
the bash profile is not loaded.

Actually sorry, I looked at it once more, it is Guix's fault. The fault
lies in environment script generated for singularity. This fault is
caused by the squashfs pack type. There is 90-environment.sh generated
in .signularity.d,
like this:

```
PATH=/gnu/store/99p9q3g8g7gri8klhkj983hjxn6fi215-profile/bin
export PATH
BASH_LOADABLES_PATH=/gnu/store/99p9q3g8g7gri8klhkj983hjxn6fi215-profile/lib/bash
export BASH_LOADABLES_PATH
GUIX_PYTHONPATH=/gnu/store/99p9q3g8g7gri8klhkj983hjxn6fi215-profile/lib/python3.11/site-packages
export GUIX_PYTHONPATH
GUIX_PYTHONPATH=/gnu/store/99p9q3g8g7gri8klhkj983hjxn6fi215-profile/lib/python2.7/site-packages
export GUIX_PYTHONPATH
```

Person who wrote it didn't take into account the same search path can be
used twice.

I think it would be best if the pack type is updated to just source the
profile etc/profile file instead, but I think it will be up to
discussion with people who know more about this file.

Apologies for wrong lead once more,
Rutherther


Reply via email to