6

I am trying to run a python script which depends on other modules, however I ran into this:

bash-3.2$ PYTHONPATH=/my/path/tables-2.3.1/build/lib.linux-x86_64-2.7/ ./fastcluster.py
Traceback (most recent call last):
  File "./fastcluster.py", line 5, in <module>
    import tables
  File "/my/path/tables-2.3.1/build/lib.linux-x86_64-2.7/tables/__init__.py", line 59, in <module>
    from tables.utilsExtension import getPyTablesVersion, getHDF5Version
ImportError: libhdf5.so.7: cannot open shared object file: No such file or directory
bash-3.2$ ls libhdf5.so.7
libhdf5.so.7
bash-3.2$

No such file or directory libhdf5.so.7 ? But when I 'ls' it, it's there, right in my directory. So what's going on here?

Karl
  • 5,613
  • 13
  • 73
  • 107
  • 1
    check for the top answer here: http://stackoverflow.com/questions/1099981/why-cant-python-find-shared-objects-that-are-in-directories-in-sys-path?answertab=votes#tab-top it may satisfy your needs – Samuele Mattiuzzo Dec 31 '12 at 11:39

1 Answers1

8

The loader isn't looking there. Either put it in one of the standard locations for libraries, add the directory to the loader configuration, or set $LD_LIBRARY_PATH before running Python.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358