From: Wojtek Kosior via <help-guix@gnu.org>
To: mprodrigues@posteo.net
Cc: help-guix@gnu.org
Subject: Re: Problem loading numpy and other on a venv in a guix system
Date: Tue, 29 Nov 2022 19:33:35 +0100 [thread overview]
Message-ID: <20221129193335.1f263845@koszkonutek-tmp.pl.eu.org> (raw)
In-Reply-To: <3ee102246f0716dc9e4d1330062639ca@posteo.net>
[-- Attachment #1: Type: text/plain, Size: 2202 bytes --]
Hi Mateus!
Indeed, when using virtualenv's numpy, this
python3 -c 'import numpy'
fails with the error you posted. I seem to have been able to make numpy
happy by instead running Python like
LD_LIBRARY_PATH=/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11/lib/ python3 -c 'import numpy'
If you use the `--container` and `--emulate-fhs` options to
`guix shell`, it is also possible to instead do
LD_LIBRARY_PATH=/usr/lib/ python3 -c 'import numpy'
The `libz` guix package still needs to be included among the packages
passed to `guix shell` in this last case.
Also, given you're using virtualenv, you might find the `--network`
option to `guix shell` useful :)
I hope there isn't any dumb mistake in my solution... Good luck :)
Wojtek
-- (sig_start)
website: https://koszko.org/koszko.html
PGP: https://koszko.org/key.gpg
fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A
Meet Kraków saints! #27: blessed Maria Klemensa Staszewska
Poznaj świętych krakowskich! #27: błogosławiona Maria Klemensa Staszewska
https://pl.wikipedia.org/wiki/Maria_Klemensa_Staszewska
-- (sig_end)
On Tue, 29 Nov 2022 16:42:14 +0000
mprodrigues@posteo.net wrote:
> Hello,
>
> I've been using a guix shell with a couple of python packages and it
> works fine,
> however I'd also like to keep the option of using a virtualenv if
> possible, the
> thing is I'm having problem running modules like numpy, that depend on
> non
> python dependencies. The error I get when I try to load numpy in a venv
> is:
>
> Importing the numpy C-extensions failed. This error can happen for many
> reasons,
> often due to issues with your setup or how NumPy was installed.
>
> and in the end:
>
> Original error was: libz.so.1: cannot open shared object file: No such
> file or
> directory
>
> I have tried installing zlib directly, also tried to add my default
> profile libs
> path to the venv PATH, but to no avail until now. How can I solve this?
> Or
> maybe someone can point me in the direction that I have to take to
> properly
> debug this.
>
> Best regards,
> Mateus Rodrigues
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-11-29 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 16:42 Problem loading numpy and other on a venv in a guix system mprodrigues
2022-11-29 18:33 ` Wojtek Kosior via [this message]
2022-11-30 9:42 ` mprodrigues
2022-11-30 11:21 ` Wojtek Kosior via
2022-11-30 8:13 ` zimoun
2022-11-30 8:47 ` Wojtek Kosior via
2022-11-30 9:46 ` mprodrigues
2022-11-30 12:07 ` zimoun
2022-11-30 12:37 ` zimoun
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=20221129193335.1f263845@koszkonutek-tmp.pl.eu.org \
--to=help-guix@gnu.org \
--cc=koszko@koszko.org \
--cc=mprodrigues@posteo.net \
/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.
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).