[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem loading numpy and other on a venv in a guix system

From: mprodrigues
Subject: Re: Problem loading numpy and other on a venv in a guix system
Date: Wed, 30 Nov 2022 09:42:34 +0000

Hi Wojtek,

thanks for your help, indeed setting LD_LIBRARY_PATH solves the issue, but it is less than ideal as I have to first check exactly the PATH to set, and if I update guix this will also change I believe, still it is not so bad. I'd still like
to understand why this happens in the first place.

Best regards,
Mateus Rodrigues

On 29.11.2022 19:33, Wojtek Kosior wrote:
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

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 :)


-- (sig_start)
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
-- (sig_end)

On Tue, 29 Nov 2022 16:42:14 +0000 wrote:


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
python dependencies. The error I get when I try to load numpy in a venv

Importing the numpy C-extensions failed. This error can happen for many
often due to issues with your setup or how NumPy was installed.

and in the end:

Original error was: cannot open shared object file: No such
file or

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?
maybe someone can point me in the direction that I have to take to
debug this.

Best regards,
Mateus Rodrigues

reply via email to

[Prev in Thread] Current Thread [Next in Thread]