question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import h5py: undefined symbol: H5Ovisit_by_name

See original GitHub issue

To assist reproducing bugs, please include the following:

  • Operating System Ubuntu 16.04.2 LTS
  • Python version 3.6
  • Where Python was acquired: Anaconda
  • h5py version 2.9.0.post0
  • HDF5 version 1.10.4
  • The full traceback/stack trace shown (if it appears)

h5py.version.info contains the needed versions, which can be displayed by

python -c 'import h5py; print(h5py.version.info)'

where python should be substituted for the path to python used to install h5py with.

I installed mpi hdf5 as following:

export CC=mpicc
python setup.py configure --mpi 
python setup.py build
python setup.py install

but when in import h5py, it shows that /home/studenter/haoyut/anaconda3/lib/python3.6/site-packages/h5py/defs.cpython-36m-x86_64-linux-gnu.so: undefined symbol: H5Ovisit_by_name

it seems with lib things, I have add this to my .bashrc: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/studenter/haoyut/local_install/hdf5-1.10.4/install/lib export LD_RUN_PATH=$LD_RUN_PATH:/home/studenter/haoyut/local_install/hdf5-1.10.4/install/lib

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lldelislecommented, Jul 24, 2019

Unfortunately the problem is still present. I still have the issue when I use python 3.7: With conda:

conda activate justh5pypy3.6
python -c "import h5py"
# No issue
conda install python=3.7
python -c "import h5py"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.7/site-packages/h5py/__init__.py", line 36, in <module>
    from ._conv import register_converters as _register_converters
  File "h5py/h5r.pxd", line 21, in init h5py._conv
  File "h5py/_objects.pxd", line 12, in init h5py.h5r
  File "h5py/_objects.pyx", line 1, in init h5py._objects
ImportError: /usr/lib/python3.7/site-packages/h5py/defs.cpython-37m-x86_64-linux-gnu.so: undefined symbol: H5Ovisit_by_name

If you need more log, do not hesitate. Thanks,

Lucille

0reactions
tacaswellcommented, Aug 28, 2019

I am going to close this as a packaging issue that has been resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when importing h5/h5py on conda: undefined symbol
Worked for me: pip uninstall h5py pip install --no-cache-dir h5py.
Read more >
import h5py: undefined symbol: H5Pget_fapl_mpio - HDF Forum
I have installed h5py 2.5.0 with mpi switched on. I used: export CC=mpicc python3 setup.py configure --mpi python3 setup.py build
Read more >
ImportError: undefined symbol: H5Pget_fapl_mpio
Looks like you're not linking against Parallel HDF5 for some reason. Double-check the value for --hdf5=/path/to/hdf5 in your build; it
Read more >
latest PDF - h5py Documentation
Accessing the File instance after the underlying file object has been closed will result in undefined behaviour. When using an in-memory object ...
Read more >
importerror undefined symbol: _ztvn3fst11symboltablee
from "name of.pyx file" import "name of the class to import" Import error: /home/.../filename.so: undefined symbol: _ZTINSt8ios_base7failureB5cxx11E.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found