From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#30229: Python modules installed by pip in virtualenv can't find shared objects. Date: Tue, 23 Jan 2018 13:00:24 +0100 Message-ID: <87h8rczsx3.fsf@elephly.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eejmv-0001dG-21 for bug-guix@gnu.org; Thu, 25 Jan 2018 10:50:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eejms-0003h3-0a for bug-guix@gnu.org; Thu, 25 Jan 2018 10:50:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:34833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eejmr-0003gw-TK for bug-guix@gnu.org; Thu, 25 Jan 2018 10:50:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eejmr-0002f5-Iz for bug-guix@gnu.org; Thu, 25 Jan 2018 10:50:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Fis Trivial Cc: 30229@debbugs.gnu.org Hi, > When a python module needs to load a dynamic shared object, it looks in t= he > path provided by *LD_LIBRARY_PATH*(1), but guix doesn't modify this envir= onment > variable to export the needed path for python. We cannot set this environment variable by default lest we break other packages that may be installed. LD_LIBRARY_PATH is dangerous as it tells the runtime linker to prefer libraries in the specified directories. For Guix packages we use different means to embed store paths in binaries, which are looked up at runtime. For binaries that=E2=80=99s achi= eved with RUNPATH; for others we patch the sources to ensure that libraries are not looked up merely by name but by absolute path. In your particular case (installing packages without Guix) I think the best way is to manually set LD_LIBRARY_PATH on demand, or to set LD_PRELOAD to the specific libraries that are required. In general, though, I recommend using Guix for package management and development instead of virtualenv and pip. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net