[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53258: Python unable to find modules within a Singularity container
From: |
Marek Felšöci |
Subject: |
bug#53258: Python unable to find modules within a Singularity container created with guix pack |
Date: |
Fri, 14 Jan 2022 15:20:46 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.10.2 |
Hello folks,
Recently, I have come around this issue. I created a Singularity container using
the following `guix pack` command:
`guix pack -f squashfs bash coreutils python python-numpy`
Then, I run a bash shell within the container:
`singularity exec test.gz.squashfs bash`
Now, if I want to use numpy,
`python3 -m numpy`
it gives me the following error and the numpy module IS NOT found:
Error in sitecustomize; set PYTHONVERBOSE for traceback:
ValueError:
'/gnu/store/2dyd6rlcc9m68k3mvkw86k8dygkbg025-profile/bin/../../p5fgysbcnnp8b1d91mrvjvababmczga0-python-3.9.6/lib/python3.9/site-packages'
is not in list
/gnu/store/2dyd6rlcc9m68k3mvkw86k8dygkbg025-profile/bin/python3: No module named
numpy
However, if I do,
`export PYTHONPATH=$GUIX_PYTHONPATH`
the numpy module IS found:
Error in sitecustomize; set PYTHONVERBOSE for traceback:
ValueError:
'/gnu/store/2dyd6rlcc9m68k3mvkw86k8dygkbg025-profile/bin/../../p5fgysbcnnp8b1d91mrvjvababmczga0-python-3.9.6/lib/python3.9/site-packages'
is not in list
/gnu/store/2dyd6rlcc9m68k3mvkw86k8dygkbg025-profile/bin/python3: No module named
numpy.__main__; 'numpy' is a package and cannot be directly executed
Still, the sitecustomize error persists.
See the output of `guix describe` below (only the guix channel):
Pokolenie 3 14. január 2022 14:33:06 (súčasné)
guix 5c5d9e5
zdroj repozitára: https://git.savannah.gnu.org/git/guix.git
vetva: master
úprava: 5c5d9e5a3208fa51351c6ad8267eba3d96fa2232
Thanks,
Marek
- bug#53258: Python unable to find modules within a Singularity container created with guix pack,
Marek Felšöci <=