lhelontra / tensorflow-on-arm

TensorFlow for Arm
MIT License
1.05k stars 274 forks source link

Install error: error: libhdf5.so: cannot open shared object file: No such file or directory #75

Closed wltz closed 4 years ago

wltz commented 4 years ago

I am trying to install tensorflow-1.14.0-cp27-none-linux_aarch64.whl on a development board. Development board has Debian, Release 10 installed. Python 2.7 I had installed the dependences. Did anyone encounter this issue too? Thanks!

After executing "pip install --user tensorflow-1.14.0-cp27-none-linux_aarch64.whl", I got following error:

Processing ./tensorflow-1.14.0-cp27-none-linux_aarch64.whl Collecting keras-preprocessing>=1.0.5 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/28/6a/8c1f62c37212d9fc441a7e26736df51ce6f0e38455816445471f10da4f0a/Keras_Preprocessing-1.1.0-py2.py3-none-any.whl Collecting enum34>=1.1.6 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl Collecting keras-applications>=1.0.6 (from tensorflow==1.14.0) Requirement already satisfied: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.12.0) Collecting grpcio>=1.8.6 (from tensorflow==1.14.0) Requirement already satisfied: numpy<2.0,>=1.14.5 in /usr/lib/python2.7/dist-packages (from tensorflow==1.14.0) (1.16.2) Collecting tensorboard<1.15.0,>=1.14.0 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/f4/37/e6a7af1c92c5b68fb427f853b06164b56ea92126bcfd87784334ec5e4d42/tensorboard-1.14.0-py2-none-any.whl Collecting gast>=0.2.0 (from tensorflow==1.14.0) Collecting google-pasta>=0.1.6 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/35/95/d41cd87d147742ef72d5d1dc317318486e3fbffdadf24a60e70dedf01d56/google_pasta-0.1.7-py2-none-any.whl Collecting protobuf>=3.6.1 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/0d/2e/d4b1b67c264ce6722def110f2715461e9b4d49647952750c82c6b247bfa6/protobuf-3.9.1-py2.py3-none-any.whl Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/3c/d5/21860a5b11caf0678fbc8319341b0ae21a07156911132e0e71bffed0510d/tensorflow_estimator-1.14.0-py2.py3-none-any.whl Collecting backports.weakref>=1.0rc1 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/88/ec/f598b633c3d5ffe267aaada57d961c94fdfa183c5c3ebda2b6d151943db6/backports.weakref-1.0.post1-py2.py3-none-any.whl Collecting absl-py>=0.7.0 (from tensorflow==1.14.0) Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (from tensorflow==1.14.0) (0.32.3) Collecting wrapt>=1.11.1 (from tensorflow==1.14.0) Requirement already satisfied: mock>=2.0.0 in /usr/lib/python2.7/dist-packages (from tensorflow==1.14.0) (2.0.0) Collecting termcolor>=1.1.0 (from tensorflow==1.14.0) Collecting astor>=0.6.0 (from tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/d1/4f/950dfae467b384fc96bc6469de25d832534f6b4441033c39f914efd13418/astor-0.8.0-py2.py3-none-any.whl Collecting h5py (from keras-applications>=1.0.6->tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/5f/97/a58afbcf40e8abecededd9512978b4e4915374e5b80049af082f49cebe9a/h5py-2.10.0.tar.gz Collecting futures>=2.2.0; python_version < "3.2" (from grpcio>=1.8.6->tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/d8/a6/f46ae3f1da0cd4361c344888f59ec2f5785e69c872e175a748ef6071cdb5/futures-3.3.0-py2-none-any.whl Collecting markdown>=2.6.8 (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl Collecting werkzeug>=0.11.15 (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl Collecting setuptools>=41.0.0 (from tensorboard<1.15.0,>=1.14.0->tensorflow==1.14.0) Using cached https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl Building wheels for collected packages: h5py Building wheel for h5py (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"'; file='"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdistwheel -d /tmp/pip-wheel-2H1BW --python-tag cp27 cwd: /tmp/pip-install-rPQoSI/h5py/ Complete output (88 lines): Unable to find pgen, not compiling formal grammar. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Plex/Scanners.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Plex/Actions.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/Scanning.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/Visitor.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/FlowControl.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Runtime/refnanny.pyx because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/FusedNode.py because it changed. Compiling /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Tempita/_tempita.py because it changed. [1/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/FlowControl.py [2/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/FusedNode.py [3/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/Scanning.py [4/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Compiler/Visitor.py [5/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Plex/Actions.py [6/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Plex/Scanners.py [7/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Runtime/refnanny.pyx [8/8] Cythonizing /tmp/easy_install-92LcTy/Cython-0.29.13/Cython/Tempita/_tempita.py warning: no files found matching 'Doc/' warning: no files found matching '.pyx' under directory 'Cython/Debugger/Tests' warning: no files found matching '.pxd' under directory 'Cython/Debugger/Tests' warning: no files found matching '.pxd' under directory 'Cython/Utility' warning: no files found matching 'pyximport/README'

Installed /tmp/pip-install-rPQoSI/h5py/.eggs/Cython-0.29.13-py2.7-linux-aarch64.egg running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-2.7 creating build/lib.linux-aarch64-2.7/h5py copying h5py/highlevel.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/h5py_warnings.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/ipy_completer.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/init.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/version.py -> build/lib.linux-aarch64-2.7/h5py creating build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/group.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/attrs.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/datatype.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/compat.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/init.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/files.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/selections.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/base.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/dims.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/dataset.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/vds.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/selections2.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/filters.py -> build/lib.linux-aarch64-2.7/h5py/_hl creating build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_completions.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attribute_create.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_threads.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file_image.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file2.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_base.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dimension_scales.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_group.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_slicing.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_deprecation.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5f.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attrs_data.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/init.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dtype.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_selections.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5p.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_filters.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attrs.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/common.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_datatype.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5pl.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_objects.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5t.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file.py -> build/lib.linux-aarch64-2.7/h5py/tests creating build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/init.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds running build_ext ('Loading library to get version:', 'libhdf5.so') error: libhdf5.so: cannot open shared object file: No such file or directory

ERROR: Failed building wheel for h5py Running setup.py clean for h5py Failed to build h5py Installing collected packages: keras-preprocessing, enum34, h5py, keras-applications, futures, grpcio, setuptools, markdown, werkzeug, absl-py, protobuf, tensorboard, gast, google-pasta, tensorflow-estimator, backports.weakref, wrapt, termcolor, astor, tensorflow Found existing installation: Keras-Preprocessing 1.0.3 Uninstalling Keras-Preprocessing-1.0.3: Successfully uninstalled Keras-Preprocessing-1.0.3 Running setup.py install for h5py ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"'; file='"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-lEbOfd/install-record.txt --single-version-externally-managed --compile --user --prefix= cwd: /tmp/pip-install-rPQoSI/h5py/ Complete output (64 lines): running install running build running build_py creating build creating build/lib.linux-aarch64-2.7 creating build/lib.linux-aarch64-2.7/h5py copying h5py/highlevel.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/h5py_warnings.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/ipy_completer.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/init.py -> build/lib.linux-aarch64-2.7/h5py copying h5py/version.py -> build/lib.linux-aarch64-2.7/h5py creating build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/group.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/attrs.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/datatype.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/compat.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/init.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/files.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/selections.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/base.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/dims.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/dataset.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/vds.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/selections2.py -> build/lib.linux-aarch64-2.7/h5py/_hl copying h5py/_hl/filters.py -> build/lib.linux-aarch64-2.7/h5py/_hl creating build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_completions.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attribute_create.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_threads.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file_image.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file2.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_base.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dimension_scales.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_group.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_slicing.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_deprecation.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5f.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attrs_data.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/init.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dtype.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_selections.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5p.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_filters.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_dataset.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_attrs.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/common.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_datatype.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5pl.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_objects.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_h5t.py -> build/lib.linux-aarch64-2.7/h5py/tests copying h5py/tests/test_file.py -> build/lib.linux-aarch64-2.7/h5py/tests creating build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/init.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-aarch64-2.7/h5py/tests/test_vds running build_ext ('Loading library to get version:', 'libhdf5.so') error: libhdf5.so: cannot open shared object file: No such file or directory

ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"'; file='"'"'/tmp/pip-install-rPQoSI/h5py/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-lEbOfd/install-record.txt --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.

acai66 commented 4 years ago

try run 'sudo apt install libhdf5-dev' before

Jarvis-Cai commented 4 years ago

@wltz hey, do you figure this out? I meet the same question as you do.Please help.

acai66 commented 4 years ago

@wltz hey, do you figure this out? I meet the same question as you do.Please help.

yes,i installed hdf5 by apt

Namburger commented 4 years ago

@Jarvis-Cai try this:

$ sudo apt-get install python-h5py

Works for me

hxdyj commented 4 years ago

same error, what should centos 7 resolve this problem ?

snowcrumble commented 4 years ago

same error, what should centos 7 resolve this problem ?

https://support.hdfgroup.org/ftp/HDF5/releases/ There is the release page. you can download prebuild binary or build from source

Benattoushoussem commented 3 months ago

same error