jeffdaily / parasail-python

Python bindings for the parasail C library.
Other
87 stars 17 forks source link

OSError: libparasail.so: cannot open shared object file: No such file or directory #10

Closed philres closed 6 years ago

philres commented 6 years ago

Hi Jeff,

I encountered a problem when using pip install parasail:

docker run -ti ubuntu:trusty bash
apt-get update && apt-get install -y \
        git \
        python-dev \
        python-pip  \
        build-essential \
        liblzma-dev \
        libbz2-dev \
        zlib1g-dev
pip install parasail -vvv >log.txt
tail log.txt
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    writing manifest file 'numpy.egg-info/SOURCES.txt'
    Copying numpy.egg-info to /usr/local/lib/python2.7/dist-packages/numpy-1.13.1.egg-info
    running install_scripts
    copying build/scripts.linux-x86_64-2.7/f2py -> /usr/local/bin
    changing mode of /usr/local/bin/f2py to 755
    writing list of installed files to '/tmp/pip-gdO3VT-record/install-record.txt'
Successfully installed parasail numpy
Cleaning up...
  Removing temporary dir /tmp/pip_build_root...

When trying to run the python script using parasail I get the following message:

/usr/local/lib/python2.7/dist-packages/parasail-1.0.2-py2.7.egg/parasail/libparasail.so
Traceback (most recent call last):
  File "/usr/local/bin/cuecat", line 9, in <module>
    load_entry_point('cuecat==0.1.0', 'console_scripts', 'cuecat')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.linux-x86_64/egg/cuecat/cli.py", line 10, in <module>
  File "build/bdist.linux-x86_64/egg/cuecat/scanner.py", line 4, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/dist-packages/parasail-1.0.2-py2.7.egg/parasail/__init__.py", line 29, in <module>
    _lib = ctypes.CDLL(_libname)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libparasail.so: cannot open shared object file: No such file or directory

I tried locating the so file:

find / -iname libparasail.so

But apparently there is none.

I attached the pip log: pip_parasail_log.txt

Don't know why it happens, on my Mac and another machine it worked without problems.

Compiling and installing parasail manually fixes the problem. However, it would be great to have pip handle this. Therefore, I would appreciate any help.

Thanks, Philipp

jeffdaily commented 6 years ago

This should be fixed in https://github.com/jeffdaily/parasail-python/commit/55090dced9c4cf04177487c1981155c4ce7d9228. Should be part of the 1.1.6. release.

kulesha commented 5 years ago

it looks like the bug is back in 1.1.15 ..

ubuntu:~$ find / -name 'parasail' 2>&1 | grep para /usr/local/lib/python2.7/dist-packages/parasail /usr/local/lib/python2.7/dist-packages/parasail/parasail.dll /usr/local/lib/python2.7/dist-packages/parasail-1.1.15.dist-info /usr/local/lib/python3.5/dist-packages/parasail /usr/local/lib/python3.5/dist-packages/parasail/parasail.dll /usr/local/lib/python3.5/dist-packages/parasail-1.1.15.dist-info ubuntu:~$

installed version 1.1.14 and .so file is back

ubuntu:~$ find / -name 'parasail' 2>&1 | grep para /usr/local/lib/python2.7/dist-packages/parasail /usr/local/lib/python2.7/dist-packages/parasail/libparasail.so /usr/local/lib/python2.7/dist-packages/parasail/parasail.dll /usr/local/lib/python2.7/dist-packages/parasail-1.1.14-py2.7.egg-info /usr/local/lib/python2.7/dist-packages/parasail-1.1.15.dist-info /usr/local/lib/python3.5/dist-packages/parasail /usr/local/lib/python3.5/dist-packages/parasail/parasail.dll /usr/local/lib/python3.5/dist-packages/parasail-1.1.15.dist-info ubuntu:~$