From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uHQfLKklh2MVQAAAbAwnHQ (envelope-from ) for ; Wed, 30 Nov 2022 10:43:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MFYMLKklh2MYOQAAauVa8A (envelope-from ) for ; Wed, 30 Nov 2022 10:43:05 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6D3A229899 for ; Wed, 30 Nov 2022 10:43:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0Jc4-0002PO-Mz; Wed, 30 Nov 2022 04:42:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0Jc3-0002PG-6G for help-guix@gnu.org; Wed, 30 Nov 2022 04:42:43 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0Jbz-0002dY-Vw for help-guix@gnu.org; Wed, 30 Nov 2022 04:42:42 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9E84B240026 for ; Wed, 30 Nov 2022 10:42:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669801357; bh=c1FH3qCW86UBYeyw3eGLsMu5LWGMXa4m7Wc+nVXoDB0=; h=Date:From:To:Cc:Subject:From; b=M0XQMFsQilKS8beB4XHTtCAJopgvTCfNLKsHGE9+AG5MygbaHjEkDkA/qHZZ7FQyK mQCkNR0UbCBbLR8poWOHZCEy1L9ttEuE1vRuPQeGFH23PeclhHJVWufTJcb3ILjs1m 7ZZyMLGXhmHXlY/Y8G0oX5H/AamYqOOK2SWq/Uh3QmN0IidX+7FXZI5yYOfey6GI1w 3vEcxvo0hKLILVhf744PN632IjLQgFT6EjXmbsSUi330avMqFy3AMMsDaZqZFUIaK+ EAkSm1N2RohT2E8FoY8JJI4bNlE6J+nmO0SnnQnaOehuLbi1q6f6jwCfaRAwgbnmub Wye6rNfTH1oLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NMZ4V4p0Gz6tmQ; Wed, 30 Nov 2022 10:42:34 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Nov 2022 09:42:34 +0000 From: mprodrigues@posteo.net To: Wojtek Kosior Cc: help-guix@gnu.org Subject: Re: Problem loading numpy and other on a venv in a guix system In-Reply-To: <20221129193335.1f263845@koszkonutek-tmp.pl.eu.org> References: <3ee102246f0716dc9e4d1330062639ca@posteo.net> <20221129193335.1f263845@koszkonutek-tmp.pl.eu.org> Message-ID: Received-SPF: pass client-ip=185.67.36.65; envelope-from=mprodrigues@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669801385; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=qr4LGxfFhqAE3PypnFtbkZce2lz5x9TxChJ4Yl2oG3I=; b=hf80DnupRvD1+sQgIsF6QOjRwiviZB0YkRPQsJwOo0FUOwVaxIeMV8VSFtEMKbBJhD11mM 0PEkM2lmJiyJ2HCD8rkDAJetz+6ObLrm5jhttuoE5qK4RC+Y9NZBppyr0CrLiybKKt8KVY ZThh+FtgL9eRKyB0CvSmVMoAFUc/elkL0qJ/N40eOZDm2IfJi06cchDnW0h94NGQECbFLE Q35HDc4novXIACQD1CUi+iDK9tLOQScP2Zem6s7pPcF3K4+gcqqEkqnd/9FEGQZhWPby5U +gAQ5c83nQD3jG11f9q80PrWY2996g0iF/cWCBs1W0Hl54+wXyWwyPGjIqGpbQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669801385; a=rsa-sha256; cv=none; b=nuJbe1elWam82EsImwjW0j/QwcBPpaLYde6bAoe9MvpqUR6WJ4Nj+prVQeeLMwJc8f0/4F xkhFa/5Ko89j8480b5GyjAQU3ebv7eRPv9FTpHC7OlKXknXVNpkuX6MP1gVfwworfp+BDs 0EeRIp1X22+8EjKjc/gCxpKOt1ueWiKmL6vq+X9OMmG7vcPtnvw9jwStwLgc5IJu2oCz2P eMYdROwSAHZjGzBnCrqab/2EQoGE/LqK+nV0AKa23rzhN2bjC1VgRQDu43xKFG2+t17e4+ xMfWzFuRwT08uFMrHj21AqTSSU1f/H3ES65YBVdD72t+XdMLSZYisQLaeTvbtQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=M0XQMFsQ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=M0XQMFsQ; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6D3A229899 X-Spam-Score: -4.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: TWT567QkJcAV Hi Wojtek, thanks for your help, indeed setting LD_LIBRARY_PATH solves the issue,=20 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=20 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! >=20 > Indeed, when using virtualenv's numpy, this >=20 > python3 -c 'import numpy' >=20 > fails with the error you posted. I seem to have been able to make numpy > happy by instead running Python like >=20 >=20 > LD_LIBRARY_PATH=3D/gnu/store/8qv5kb2fgm4c3bf70zcg9l6hkf3qzpw9-zlib-1.2.11= /lib/ > python3 -c 'import numpy' >=20 > If you use the `--container` and `--emulate-fhs` options to > `guix shell`, it is also possible to instead do >=20 > LD_LIBRARY_PATH=3D/usr/lib/ python3 -c 'import numpy' >=20 > The `libz` guix package still needs to be included among the packages > passed to `guix shell` in this last case. >=20 > Also, given you're using virtualenv, you might find the `--network` > option to `guix shell` useful :) >=20 > I hope there isn't any dumb mistake in my solution... Good luck :) >=20 > Wojtek >=20 > -- (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 >=20 > Meet Krak=C3=B3w saints! #27: blessed Maria Klemensa Staszewska > Poznaj =C5=9Bwi=C4=99tych krakowskich! #27: b=C5=82ogos=C5=82awiona Mari= a Klemensa=20 > Staszewska > https://pl.wikipedia.org/wiki/Maria_Klemensa_Staszewska > -- (sig_end) >=20 >=20 > On Tue, 29 Nov 2022 16:42:14 +0000 > mprodrigues@posteo.net wrote: >=20 >> Hello, >>=20 >> 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=20 >> venv >> is: >>=20 >> Importing the numpy C-extensions failed. This error can happen for=20 >> many >> reasons, >> often due to issues with your setup or how NumPy was installed. >>=20 >> and in the end: >>=20 >> Original error was: libz.so.1: cannot open shared object file: No such >> file or >> directory >>=20 >> 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=20 >> this? >> Or >> maybe someone can point me in the direction that I have to take to >> properly >> debug this. >>=20 >> Best regards, >> Mateus Rodrigues >>=20