google-deepmind / reverb

Reverb is an efficient and easy-to-use data storage and transport system designed for machine learning research
Apache License 2.0
704 stars 92 forks source link

ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory #15

Closed klywa closed 4 years ago

klywa commented 4 years ago

I used pip to install reverb (using the exact commands in the Installation section), but got the following error when trying to import reverb.

In [1]: import reverb
2020-08-14 14:31:15.200537: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a0cab28380f6> in <module>
----> 1 import reverb

~/anaconda3/lib/python3.7/site-packages/reverb/__init__.py in <module>
     25 # pylint: enable=g-bad-import-order
     26
---> 27 from reverb import item_selectors as selectors
     28 from reverb import rate_limiters
     29

~/anaconda3/lib/python3.7/site-packages/reverb/item_selectors.py in <module>
     17 import functools
     18
---> 19 from reverb import pybind
     20
     21 Fifo = pybind.FifoSelector

~/anaconda3/lib/python3.7/site-packages/reverb/pybind.py in <module>
----> 1 import tensorflow as _tf; from .libpybind import *; del _tf

ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

I use anaconda and my Python version is 3.7.6.

Any suggestions? Thanks in advance.

jmacglashan commented 4 years ago

Your error message is different, but is it possible you have the same issue I had in #13? What's your version of TF and reverb? You might want to try using the non-nightly build of reverb

pip install dm-reverb==0.1.0

with the stable version of TF

pip install tensorflow==2.3.0
gehring commented 4 years ago

I don't think this is a reverb specific issue but rather a problem with your shared libraries (most likely a missing path since I believe anaconda will install the python shared libraries by default).

See related issues: deepmind/acme#47 deepmind/acme#65

gehring commented 4 years ago

Also, for the benefit of people stumbling on this in the future, if you are using some alternate way of building/installing python, e.g., pyenv, you should make sure that it is configured to install the python shared library. For pyenv, you'll need to add a flag in an environment variable before installing, e.g., PYTHON_CONFIGURE_OPTS="--enable-shared".

Hopefully that helps people who encounter this problem. I think it is probably safe to close this issue (to whoever has the ability to do so).

klywa commented 4 years ago

I don't think this is a reverb specific issue but rather a problem with your shared libraries (most likely a missing path since I believe anaconda will install the python shared libraries by default).

See related issues: deepmind/acme#47 deepmind/acme#65

Thanks a lot. By adding my lib path to $LD_LIBRARY_PATH, the issue is fixed.