unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Cayetano Santos via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 61967@debbugs.gnu.org
Subject: bug#61967: guix pack error with python packages
Date: Sat, 04 Mar 2023 20:35:01 +0100	[thread overview]
Message-ID: <87y1occn5t.fsf@inventati.org> (raw)


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




             reply	other threads:[~2023-03-04 19:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04 19:35 Cayetano Santos via Bug reports for GNU Guix [this message]
2023-03-05 10:11 ` bug#61967: guix pack error with python packages Josselin Poiret via Bug reports for GNU Guix
2023-03-07 21:08   ` Maxim Cournoyer
2023-03-09 19:57     ` Josselin Poiret via Bug reports for GNU Guix
2023-03-10  3:43       ` Maxim Cournoyer
2023-03-10  8:10         ` Josselin Poiret via Bug reports for GNU Guix
2023-06-05 19:53 ` bug#61967: (no subject) Cayetano Santos
2023-08-14  8:59 ` bug#61967: Fixed Cayetano Santos via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1occn5t.fsf@inventati.org \
    --to=bug-guix@gnu.org \
    --cc=61967@debbugs.gnu.org \
    --cc=cayetano.santos@inventati.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).