guix pack error with python packages

  • Done
  • quality assurance status badge
Details
4 participants
  • Cayetano Santos
  • Cayetano Santos
  • Josselin Poiret
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Cayetano Santos
Severity
normal
C
C
Cayetano Santos wrote on 4 Mar 2023 20:35
(address . bug-guix@gnu.org)
87y1occn5t.fsf@inventati.org
Hello guix,

I’m trying to deploy a test set of python packages to a remote server,
using the following guix pack command (latest guix, as for now)

guix pack -R --compression=xz --save-provenance \
-S /.guix-profile/bin=bin -S /.guix-profile/share=share \
-S /.guix-profile/etc=etc -S /.guix-profile/lib=lib \
-S /.guix-profile/include=include

The resulting file.tar.xz is sent to the server with

scp file.tar.xz server:/dir1/dir2/.

Then, when I

ssh server
cd /dir1/dir2

I do a

tar xf file.tar.xz

At this point, a ’ls /dir1/dir2’ shows, as expected

.guix-profile
gnu
file.tar.xz

Now, when I just (PYTHONPATH is empty at this point)

/dir1/dir2/.guix-profile/bin/python3 -c \
"import sys; print(sys.path)"

I get

/dir1/dir2/hj...python...
/dir1/dir2/hj...numpy...
/dir1/dir2/hj...matplotlib...

instead of

/dir1/dir2/gnu/store/hj...python...
/dir1/dir2/gnu/store/hj...numpy...
/dir1/dir2/gnu/store/hj...matplotlib...

so that when I

/dir1/dir2/.guix-profile/bin/python3 -c "import numpyt"

I get an error

ModuleNotFoundError: No module named 'numpy'

If, however, I

export GUIX_PROFILE=/dir1/dir2/.guix-profile
source $GUIX_PROFILE/etc/profile
export PYTHONPATH=$GUIX_PYTHONPATH

and then

/dir1/dir2/.guix-profile/bin/python3

I have

Error processing line 1 of
/dir1/dir2/.guix-profile/lib/python3.9/site-packages/matplotlib-3.5.2-py3.9-nspkg.pth:

Trying to ’import numpy’ gives

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/dir1/dir2/.guix-profile/lib/python3.9/site-packages/numpy/__init__.py", line 110, in <module>
import warnings
ModuleNotFoundError: No module named 'warnings'

Am I doing something wrong ? Is this a bug ?

Thanks,

Cayetano Santos
J
J
Josselin Poiret wrote on 5 Mar 2023 11:11
878rgbqzi0.fsf@jpoiret.xyz
Hi Cayetano,

Cayetano Santos via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (14 lines)
> Hello guix,
>
> I’m trying to deploy a test set of python packages to a remote server,
> using the following guix pack command (latest guix, as for now)
>
> guix pack -R --compression=xz --save-provenance \
> -S /.guix-profile/bin=bin -S /.guix-profile/share=share \
> -S /.guix-profile/etc=etc -S /.guix-profile/lib=lib \
> -S /.guix-profile/include=include
>
> The resulting file.tar.xz is sent to the server with
>
> scp file.tar.xz server:/dir1/dir2/.

This is most likely [1], which hasn't been fixed yet but I have a patch
to that effect. The problem is that it would cause a lot of rebuilds so
I haven't sent it yet, I'll send it after the core-updates merge.

mid: 67e7d225-f824-b691-7125-6b37abef8bb0@felsoci.sk

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmQEascQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5FhcaioZvDACjMmQz3d6i+Gc3SNPacn8eKLNWgY+ExL/e
zBseS5TVAn1rPOBnCv3ADwIIBJwOy1RAwHjYENsJ6WLZhg1D5lZOg6ihC3sh6VzJ
by9fMYP6sLasmTZAIsXiXKL6JrRtI3pV5fWtOrD4nISH3E68v4KYIb1WEh3Fu99r
w7GMli+0/oYjPlSZQ2SbgBB5vjIVX+GuBlqYIrwFnxhTttTLcIxHwCwRb+dwx5cC
ia5XlxYoD1MRFK2it359onst6qoB11kVPEb3HqBUtDdyKm3pQSj98H2AlKzc79Ma
Z+hhx4Ym0Q/V5meX0oc7Ttckz/dAbdcXsvGneG/O/UN0gi4sCjZY//4O+zrewdvj
KyhNwRuFdGU/lwEpD2IxS6BcL2r9YAIwMKWboD8FhgwOzE15tJWwNWfPzEpEnccu
ATRSG2Rymw9Dt4V+Bw26gtpHPEe9Y2gT/kdpR6Fr8TRoGSj+HuLsbXi6hykXjZJU
N43Vcsvz0wUpsms0M1fJM27/ORU53VM=
=fZSA
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 7 Mar 2023 22:08
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
87356gw9p8.fsf@gmail.com
Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> writes:

Toggle quote (22 lines)
> Hi Cayetano,
>
> Cayetano Santos via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
>
>> Hello guix,
>>
>> I’m trying to deploy a test set of python packages to a remote server,
>> using the following guix pack command (latest guix, as for now)
>>
>> guix pack -R --compression=xz --save-provenance \
>> -S /.guix-profile/bin=bin -S /.guix-profile/share=share \
>> -S /.guix-profile/etc=etc -S /.guix-profile/lib=lib \
>> -S /.guix-profile/include=include
>>
>> The resulting file.tar.xz is sent to the server with
>>
>> scp file.tar.xz server:/dir1/dir2/.
>
> This is most likely [1], which hasn't been fixed yet but I have a patch
> to that effect. The problem is that it would cause a lot of rebuilds so
> I haven't sent it yet, I'll send it after the core-updates merge.

If you send it *after* the core-updates merge (to core-updates)? It's
going to be quite a while before it lands to master. Perhaps you could
send it now? core-updates is the right branch for mass rebuilds.

--
Thanks,
Maxim
J
J
Josselin Poiret wrote on 9 Mar 2023 20:57
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87fsadd7ev.fsf@jpoiret.xyz
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (4 lines)
> If you send it *after* the core-updates merge (to core-updates)? It's
> going to be quite a while before it lands to master. Perhaps you could
> send it now? core-updates is the right branch for mass rebuilds.

I think we are trying to move away from the massive core-updates branch
and rather work with feature branches instead, although the pending
core-updates merge is blocking the change for now. I don't want to add
yet more work for people courageously working on core-updates right now.

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmQKOjkQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5Fhcaig8BC/9qn4HSXT7RbaLTxqcv4K2tGa/XlvUgeCtz
Xfl8Qlfx5197itj7FNhBWdprMWm8HNM3iPnuXkfuBRsWaiY9HbueqMVZ4SWEFk+z
P6x0tM3e/TR659PGoSYhMUyXUqtWQtAQPlAgDJt951Ex/ZDxiyypVnEwqDEot1GV
DsZCm8VDKVBI1V8oq9YIZnbWTJy1MLYrUjVXa3QRxxT82KEpn1Cl7AyKVv8XKUgd
hZ4iIwlOLzh2AXQKW2lZLYPM2wL+AlwjlWL7fO6MGG4CIRcS1iAGudmosZnoQl9H
02N1z7CmgULfUb55bsVOTiOC33jumo8d4VW7mOp00GXyprrqB3YYceJmsJ8W6kcM
EN2E177mBD6Pdh00xWqfkCLg3/+tf4xteg0ZrJyGmLy5iG9UZt5F0cwJDaD9yQMt
fxW2ol1KaJP9xRUOyBWNghugGAVGVwj8qqSUuRAf4fBPWSlQAWCL5ASQv5VnaZ1f
rl12eTujH9LWQ5bE7nwzCVHk+JqwYQU=
=PDPD
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 10 Mar 2023 04:43
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
878rg5tgn5.fsf@gmail.com
Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> writes:

Toggle quote (13 lines)
> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> If you send it *after* the core-updates merge (to core-updates)? It's
>> going to be quite a while before it lands to master. Perhaps you could
>> send it now? core-updates is the right branch for mass rebuilds.
>
> I think we are trying to move away from the massive core-updates branch
> and rather work with feature branches instead, although the pending
> core-updates merge is blocking the change for now. I don't want to add
> yet more work for people courageously working on core-updates right now.

Perhaps I'm out of the loop, but in my book the main branches should
never close. If there's a need to freeze the state of one the three
main branches new development branches can be created. This was
discussed in the past.

--
Thanks,
Maxim
J
J
Josselin Poiret wrote on 10 Mar 2023 09:10
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87r0txauwr.fsf@jpoiret.xyz
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (5 lines)
> Perhaps I'm out of the loop, but in my book the main branches should
> never close. If there's a need to freeze the state of one the three
> main branches new development branches can be created. This was
> discussed in the past.

I don't think there was a freeze for core-updates this time, commits are
still rolling in on the core-updates branch.

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmQK5gQQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5Fhcaiu68C/9jkhtfaDrOI2DqUDzwkCyoyXQgsqw7y/3s
Y7jn/F7cV95i1ynblyVKvUmLKBVeiQRIVl5T8jLZUIBrweNkyRmflcz08dc3lNUv
OA+/amRD7V8gs1s/azqzXr2MJOWEq1rp7X7ohtC41HhWNFlFXMxcfZWOhWjGkGOn
Q0HizZAVuRvgQadrg9cgQOwd08qrmevYBbjnjDxySfhVZjUmDe6dSvta50rC/3AY
oRkqqd2begjfEmGlLW+0uAOFjJL1R5VQLZczXVgoLnpVOGrJg9i84aBHqQlq2nqr
xQ4r61SpQOCznXyqkTOPz/ycEdmZAkNWi/8Ebl1aTWJZ0uSgbNINXzm/mDsCGNx0
dnlKlQki/xf+C595yqfsyGkX/CSvhMJYaVD/fCUfnrOffIAGzx4nKHgUdYOK5MUN
sVYU2CuYVkKbIQk0JkzafApFPLxXQGQnjlCws4SjMeqrxKAdbFNiM7kWlL7SiH1n
2qyEaOtQ3Sv/pdts70inJ2pnnAQabIw=
=WZOt
-----END PGP SIGNATURE-----

C
C
Cayetano Santos wrote on 5 Jun 2023 21:53
(no subject)
(address . 61967@debbugs.gnu.org)
871qipbs42.fsf@inventati.org
Hi,

Just for the record, I fixed the problem with

export PYTHONPATH=$GUIX_PYTHONPATH:/path-to/.guix-profile/lib/python3.10/:/path-to/.guix-profile/lib/python3.10/site-packages/:/path-to/.guix-profile/lib/python3.10/lib-dynload

I’m using an up to date guix. Now I can import and use all the python
libraries with no problem.

Thanks,

Cayetano
C
C
Cayetano Santos wrote on 14 Aug 2023 10:59
Fixed.
(address . 61967-done@debbugs.gnu.org)
87pm3qf186.fsf@inventati.org

Closed
?