From: ludo@gnu.org (Ludovic Courtès)
To: Fis Trivial <ybbs.daans@hotmail.com>
Cc: 30229@debbugs.gnu.org
Subject: bug#30229: Python modules installed by pip in virtualenv can't find shared objects.
Date: Wed, 24 Jan 2018 16:01:42 +0100 [thread overview]
Message-ID: <87k1w7xpux.fsf@gnu.org> (raw)
In-Reply-To: <MWHPR16MB0063656F9561DCD3EF12634592E30@MWHPR16MB0063.namprd16.prod.outlook.com> (Fis Trivial's message of "Tue, 23 Jan 2018 11:49:59 +0000")
Hi,
Fis Trivial <ybbs.daans@hotmail.com> skribis:
> In my case, it's lightgbm (installed by pip), needs libgomp.so from gcc:lib for
> openmp support. Here is the backtrace:
>
> Traceback (most recent call last):
> File "ex1.py", line 5, in <module>
> import lightgbm as lgb
> File "/home/fis/Workspace/tianchi/medical_treatment/lib/python3.5/site-packages/lightgbm/__init__.py", line 8, in <module>
> from .basic import Booster, Dataset
> File "/home/fis/Workspace/tianchi/medical_treatment/lib/python3.5/site-packages/lightgbm/basic.py", line 32, in <module>
> _LIB = _load_lib()
> File "/home/fis/Workspace/tianchi/medical_treatment/lib/python3.5/site-packages/lightgbm/basic.py", line 27, in _load_lib
> lib = ctypes.cdll.LoadLibrary(lib_path[0])
> File "/gnu/store/jb3n0bsdpkhvyb8y70jyr8fcx8fqssr9-python-3.5.3/lib/python3.5/ctypes/__init__.py", line 425, in LoadLibrary
> return self._dlltype(name)
> File "/gnu/store/jb3n0bsdpkhvyb8y70jyr8fcx8fqssr9-python-3.5.3/lib/python3.5/ctypes/__init__.py", line 347, in __init__
> self._handle = _dlopen(self._name, mode)
> OSError: libgomp.so.1: cannot open shared object file: No such file or directory
I’d suggest hard-coding the absolute file name of libgomp.so.1 in
lightgbm/basic.py.
This is what we do, for instance, for Guile packages that use the
foreign function interface (FFI) and dynamically load shared libraries
(see ‘guile-gdbm-ffi’ as an example.)
HTH,
Ludo’.
prev parent reply other threads:[~2018-01-24 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 11:49 bug#30229: Python modules installed by pip in virtualenv can't find shared objects Fis Trivial
2018-01-23 12:00 ` Ricardo Wurmus
2018-01-23 13:21 ` Fis Trivial
2021-11-24 23:39 ` zimoun
2022-01-13 14:59 ` zimoun
2018-01-24 15:01 ` Ludovic Courtès [this message]
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=87k1w7xpux.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=30229@debbugs.gnu.org \
--cc=ybbs.daans@hotmail.com \
/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).