bug-guix
[Top][All Lists]
Advanced

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

bug#30229: Python modules installed by pip in virtualenv can't find shar


From: Ludovic Courtès
Subject: bug#30229: Python modules installed by pip in virtualenv can't find shared objects.
Date: Wed, 24 Jan 2018 16:01:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi,

Fis Trivial <address@hidden> 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’.





reply via email to

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