Failed building wheel for h5py for installing tensorflow on jetson nano

I have been solving this error since a week now. I did a detailed research for this topic on nvidia development forums. I remember the last i had this error i followed these steps and solved it. This time i installed a fresh os and ran again into h5py building error. the last time solution is not working: these are the commands i followed:

$ sudo apt-get update
$ sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
$ sudo apt-get install python3-pip
$ sudo pip3 install -U pip testresources setuptools
$ sudo ln -s /usr/include/locale.h /usr/include/xlocale.h
$ pip3 install Cython==0.29.36
$ pip3 install pkgconfig
$ git clone GitHub - h5py/h5py: HDF5 for Python -- The h5py package is a Pythonic interface to the HDF5 binary data format.
$ git checkout 3.1.0
$ git cherry-pick 3bf862daa4ebeb2eeaf3a0491e05f5415c1818e4
$ H5PY_SETUP_REQUIRES=0 pip3 install . --no-deps --no-build-isolation
$ sudo pip3 install -U numpy==1.19.4 future mock keras_preprocessing keras_applications gast==0.2.1 protobuf pybind11 packaging
$ sudo pip3 install --extra-index-url Index of /compute/redist/jp/v461 tensorflow

Following is the error i get:
eeya@ubuntu:~/h5py$ sudo pip3 install -U numpy==1.19.4 future mock keras_preprocessing keras_applications gast==0.2.1 protobuf pybind11 packaging
WARNING: The directory ‘/home/eeya/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag.
Collecting numpy==1.19.4
Downloading numpy-1.19.4-cp36-cp36m-manylinux2014_aarch64.whl (12.2 MB)
|████████████████████████████████| 12.2 MB 1.8 MB/s
Collecting future
Downloading future-0.18.3.tar.gz (840 kB)
|████████████████████████████████| 840 kB 802 kB/s
Preparing metadata (setup.py) … done
Collecting mock
Downloading mock-5.1.0-py3-none-any.whl (30 kB)
Collecting keras_preprocessing
Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
|████████████████████████████████| 42 kB 2.5 MB/s
Collecting keras_applications
Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
|████████████████████████████████| 50 kB 11.8 MB/s
Collecting gast==0.2.1
Downloading gast-0.2.1.tar.gz (10 kB)
Preparing metadata (setup.py) … done
Requirement already satisfied: protobuf in /usr/lib/python3/dist-packages (3.0.0)
Collecting protobuf
Downloading protobuf-3.19.6-py2.py3-none-any.whl (162 kB)
|████████████████████████████████| 162 kB 55 kB/s
Collecting pybind11
Downloading pybind11-2.11.1-py3-none-any.whl (227 kB)
|████████████████████████████████| 227 kB 89 kB/s
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (17.1)
Collecting packaging
Downloading packaging-21.3-py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 14.3 MB/s
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from keras_preprocessing) (1.11.0)
Collecting h5py
Downloading h5py-3.1.0.tar.gz (371 kB)
|████████████████████████████████| 371 kB 6.7 MB/s
Installing build dependencies … done
Getting requirements to build wheel … done
Installing backend dependencies … done
Preparing metadata (pyproject.toml) … done
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3/dist-packages (from packaging) (2.2.0)
Collecting cached-property
Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Building wheels for collected packages: gast, future, h5py
Building wheel for gast (setup.py) … done
Created wheel for gast: filename=gast-0.2.1-py3-none-any.whl size=7577 sha256=1a4411acf129824dd6eb6933edeaf03dec11b3184f32e01b9f3232c36c974a18
Stored in directory: /tmp/pip-ephem-wheel-cache-prfpb2n8/wheels/5a/de/13/ce88a752efbdba27fa15e3047f3445128e76d6c1a1197a9d5c
Building wheel for future (setup.py) … done
Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=494260 sha256=15fa83a49b1c536154b48f6c78691b699c491effc6d844ef2411bb24ef4be3e4
Stored in directory: /tmp/pip-ephem-wheel-cache-prfpb2n8/wheels/63/f1/0c/e56d12b3804345ce5ba34279cbfe583ecafdd1401551457330
Building wheel for h5py (pyproject.toml) … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmp0b6srkmg
cwd: /tmp/pip-install-xsh2hc0y/h5py_c77d3afd520a4c979fc99fe85e90d604
Complete output (478 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.6
creating build/lib.linux-aarch64-3.6/h5py
copying h5py/h5py_warnings.py → build/lib.linux-aarch64-3.6/h5py
copying h5py/version.py → build/lib.linux-aarch64-3.6/h5py
copying h5py/ipy_completer.py → build/lib.linux-aarch64-3.6/h5py
copying h5py/init.py → build/lib.linux-aarch64-3.6/h5py
creating build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/vds.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/dims.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/files.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/filters.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/dataset.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/attrs.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/selections.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/group.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/datatype.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/selections2.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/init.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/base.py → build/lib.linux-aarch64-3.6/h5py/_hl
copying h5py/_hl/compat.py → build/lib.linux-aarch64-3.6/h5py/_hl
creating build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/conftest.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5p.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_objects.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_filters.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dataset.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5f.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5d_direct_chunk.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_completions.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dtype.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_file.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dimension_scales.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dataset_swmr.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_selections.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_slicing.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_attrs_data.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_file_image.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/common.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_big_endian_file.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_datatype.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_attribute_create.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dims_dimensionproxy.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_dataset_getitem.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_base.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/init.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_errors.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_file2.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_group.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5t.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_h5pl.py → build/lib.linux-aarch64-3.6/h5py/tests
copying h5py/tests/test_attrs.py → build/lib.linux-aarch64-3.6/h5py/tests
creating build/lib.linux-aarch64-3.6/h5py/tests/data_files
copying h5py/tests/data_files/init.py → build/lib.linux-aarch64-3.6/h5py/tests/data_files
creating build/lib.linux-aarch64-3.6/h5py/tests/test_vds
copying h5py/tests/test_vds/test_virtual_source.py → build/lib.linux-aarch64-3.6/h5py/tests/test_vds
copying h5py/tests/test_vds/test_highlevel_vds.py → build/lib.linux-aarch64-3.6/h5py/tests/test_vds
copying h5py/tests/test_vds/test_lowlevel_vds.py → build/lib.linux-aarch64-3.6/h5py/tests/test_vds
copying h5py/tests/test_vds/init.py → build/lib.linux-aarch64-3.6/h5py/tests/test_vds
copying h5py/tests/data_files/vlen_string_dset_utc.h5 → build/lib.linux-aarch64-3.6/h5py/tests/data_files
copying h5py/tests/data_files/vlen_string_dset.h5 → build/lib.linux-aarch64-3.6/h5py/tests/data_files
copying h5py/tests/data_files/vlen_string_s390x.h5 → build/lib.linux-aarch64-3.6/h5py/tests/data_files
running build_ext
warning: h5py/config.pxi:3:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:4:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:5:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:6:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:7:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:8:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:9:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:10:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:15:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:62:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:64:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:66:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:68:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:70:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:72:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:74:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:76:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:78:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:102:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:104:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:106:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:107:4: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:109:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:110:4: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:112:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:176:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:193:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:195:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:217:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:245:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:247:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:249:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:251:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:253:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:255:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:261:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:263:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:265:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:267:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:269:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:271:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:273:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:275:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:309:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:311:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:313:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:315:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:317:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:319:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:321:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:323:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:325:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:359:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/defs.pxd:361:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:3:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:4:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:5:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:6:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:7:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:8:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:9:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:10:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:48:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:64:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:143:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:148:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:156:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:188:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_hdf5.pxd:315:2: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:3:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:4:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:5:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:6:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:7:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:8:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:9:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:10:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_ext.pxd:14:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_ext.pxd:25:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/api_types_ext.pxd:52:4: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:3:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:4:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:5:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:6:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:7:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:8:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:9:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:10:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/_conv.pyx:160:8: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/_conv.pyx:421:8: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:3:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:4:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:5:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:6:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:7:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:8:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:9:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/config.pxi:10:0: The ‘DEF’ statement is deprecated and will be removed in a future Cython version. Consider using global variables, constants, and in-place literals instead. See https://github.com/cython/cython/issues/4310
warning: h5py/h5r.pxd:17:0: The ‘IF’ statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

Error compiling Cython file:

License: Standard 3-clause BSD; see “license.txt” for full license terms

and contributor agreement.

from .defs cimport *

from ._objects cimport class ObjectID
^

h5py/h5t.pxd:13:23: Expected an identifier

Error compiling Cython file:

from logging import getLogger

from .h5 import get_config
from .h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
from .h5t cimport H5PY_OBJ, typewrap, py_create, TypeID, H5PY_PYTHON_OPAQUE_TAG
^

h5py/_conv.pyx:21:0: ‘h5py/h5t/H5PY_OBJ.pxd’ not found

Error compiling Cython file:

from logging import getLogger

from .h5 import get_config
from .h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
from .h5t cimport H5PY_OBJ, typewrap, py_create, TypeID, H5PY_PYTHON_OPAQUE_TAG
^

h5py/_conv.pyx:21:0: ‘h5py/h5t/typewrap.pxd’ not found

Error compiling Cython file:

from logging import getLogger

from .h5 import get_config
from .h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
from .h5t cimport H5PY_OBJ, typewrap, py_create, TypeID, H5PY_PYTHON_OPAQUE_TAG
^

h5py/_conv.pyx:21:0: ‘h5py/h5t/py_create.pxd’ not found

Error compiling Cython file:

from logging import getLogger

from .h5 import get_config
from .h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
from .h5t cimport H5PY_OBJ, typewrap, py_create, TypeID, H5PY_PYTHON_OPAQUE_TAG
^

h5py/_conv.pyx:21:0: ‘h5py/h5t/TypeID.pxd’ not found

Error compiling Cython file:

from logging import getLogger

from .h5 import get_config
from .h5r cimport Reference, RegionReference, hobj_ref_t, hdset_reg_ref_t
from .h5t cimport H5PY_OBJ, typewrap, py_create, TypeID, H5PY_PYTHON_OPAQUE_TAG
^

h5py/_conv.pyx:21:0: ‘h5py/h5t/H5PY_PYTHON_OPAQUE_TAG.pxd’ not found

Error compiling Cython file:


void* ptr

cdef int conv_vlen2ndarray(void* ipt,
void* opt,
cnp.dtype elem_dtype,
TypeID intype,
^

h5py/_conv.pyx:686:27: ‘TypeID’ is not a type identifier

Error compiling Cython file:

cdef int conv_vlen2ndarray(void* ipt,
void* opt,
cnp.dtype elem_dtype,
TypeID intype,
TypeID outtype) except -1:
^

h5py/_conv.pyx:687:27: ‘TypeID’ is not a type identifier

Error compiling Cython file:


return 0

cdef int conv_ndarray2vlen(void* ipt,
void* opt,
TypeID intype,
^

h5py/_conv.pyx:809:27: ‘TypeID’ is not a type identifier

Error compiling Cython file:

cdef int conv_ndarray2vlen(void* ipt,
void* opt,
TypeID intype,
TypeID outtype) except -1:
^

h5py/_conv.pyx:810:27: ‘TypeID’ is not a type identifier

Error compiling Cython file:


:return: error-code
“”"
cdef:
int command = cdata[0].command
size_t src_size, dst_size
TypeID supertype
^

h5py/_conv.pyx:628:8: ‘TypeID’ is not a type identifier

Error compiling Cython file:


“”"
cdef:
int command = cdata[0].command
size_t src_size, dst_size
TypeID supertype
TypeID outtype
^

h5py/_conv.pyx:629:8: ‘TypeID’ is not a type identifier

Error compiling Cython file:


void *bkg_i,
hid_t dxpl) except -1 with gil:
cdef:
int command = cdata[0].command
size_t src_size, dst_size
TypeID supertype
^

h5py/_conv.pyx:741:8: ‘TypeID’ is not a type identifier

Error compiling Cython file:


hid_t dxpl) except -1 with gil:
cdef:
int command = cdata[0].command
size_t src_size, dst_size
TypeID supertype
TypeID outtype
^

h5py/_conv.pyx:742:8: ‘TypeID’ is not a type identifier

Error compiling Cython file:


cdef char* ctag = NULL
try:
if H5Tget_class(obj) == H5T_OPAQUE:
ctag = H5Tget_tag(obj)
if ctag != NULL:
if strcmp(ctag, H5PY_PYTHON_OPAQUE_TAG) == 0:
^

h5py/_conv.pyx:156:32: undeclared name not builtin: H5PY_PYTHON_OPAQUE_TAG

Error compiling Cython file:


elif command == H5T_CONV_FREE:
pass

  elif command == H5T_CONV_CONV:
      # need to pass element dtype to converter
      supertype = typewrap(H5Tget_super(src_id))
                  ^

h5py/_conv.pyx:644:20: undeclared name not builtin: typewrap

Error compiling Cython file:

  elif command == H5T_CONV_CONV:
      # need to pass element dtype to converter
      supertype = typewrap(H5Tget_super(src_id))
      dt = supertype.dtype
      outtype = py_create(dt)
                ^

h5py/_conv.pyx:646:18: undeclared name not builtin: py_create

Error compiling Cython file:


PyObject pdata_elem
char
buf = <char*>buf_i

  if command == H5T_CONV_INIT:
      cdata[0].need_bkg = H5T_BKG_NO
      if not H5Tequal(src_id, H5PY_OBJ) or H5Tget_class(dst_id) != H5T_VLEN:
                              ^

h5py/_conv.pyx:750:32: undeclared name not builtin: H5PY_OBJ
Loading library to get version: /usr/lib/aarch64-linux-gnu/hdf5/serial/libhdf5.so


                     Summary of the h5py configuration

HDF5 include dirs: [
‘/usr/include/hdf5/serial’
]
HDF5 library dirs: [
‘/usr/lib/aarch64-linux-gnu/hdf5/serial’
]
HDF5 Version: (1, 10, 0)
MPI Enabled: False
Rebuild Required: True


Executing api_gen rebuild of defs
Executing cythonize()
[ 1/24] Cythonizing /tmp/pip-install-xsh2hc0y/h5py_c77d3afd520a4c979fc99fe85e90d604/h5py/_conv.pyx
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 363, in
main()
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 345, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
File “/usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/in_process/_in_process.py”, line 262, in build_wheel
metadata_directory)
File “/usr/local/lib/python3.6/dist-packages/setuptools/build_meta.py”, line 231, in build_wheel
wheel_directory, config_settings)
File “/usr/local/lib/python3.6/dist-packages/setuptools/build_meta.py”, line 215, in _build_with_temp_dir
self.run_setup()
File “/usr/local/lib/python3.6/dist-packages/setuptools/build_meta.py”, line 158, in run_setup
exec(compile(code, file, ‘exec’), locals())
File “setup.py”, line 183, in
cmdclass = CMDCLASS,
File “/usr/local/lib/python3.6/dist-packages/setuptools/init.py”, line 153, in setup
return distutils.core.setup(**attrs)
File “/usr/lib/python3.6/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/usr/lib/python3.6/distutils/dist.py”, line 955, in run_commands
self.run_command(cmd)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/tmp/pip-build-env-by27c1c7/overlay/lib/python3.6/site-packages/wheel/bdist_wheel.py”, line 299, in run
self.run_command(‘build’)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/usr/lib/python3.6/distutils/command/build.py”, line 135, in run
self.run_command(cmd_name)
File “/usr/lib/python3.6/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/usr/lib/python3.6/distutils/dist.py”, line 974, in run_command
cmd_obj.run()
File “/tmp/pip-install-xsh2hc0y/h5py_c77d3afd520a4c979fc99fe85e90d604/setup_build.py”, line 171, in run
language_level=3)
File “/tmp/pip-build-env-by27c1c7/normal/lib/python3.6/site-packages/Cython/Build/Dependencies.py”, line 1134, in cythonize
cythonize_one(*args)
File “/tmp/pip-build-env-by27c1c7/normal/lib/python3.6/site-packages/Cython/Build/Dependencies.py”, line 1301, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /tmp/pip-install-xsh2hc0y/h5py_c77d3afd520a4c979fc99fe85e90d604/h5py/_conv.pyx

ERROR: Failed building wheel for h5py
Successfully built gast future
Failed to build h5py
ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects

Please help ASAP as my work is pending…

Hi @chaudhryabdulrehman30 ,
This forum talks about issues related to Tensorrt.
I request you to raise the concern on Jetson or Tensorflow Platform.

Thanks