Cannot install h5py on Jetson Xavier NX

python 3.6+ubuntu aarch 64
I am running this command:
sudo apt-get install libhdf5-serial-dev hdf5-tools
sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple h5py
And I get this error:
Building wheels for collected packages: h5py
Building wheel for h5py (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-oprmtxyc/h5py/setup.py’"’"’; file=’"’"’/tmp/pip-install-oprmtxyc/h5py/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-1j1rtgte
cwd: /tmp/pip-install-oprmtxyc/h5py/
Complete output (512 lines):
running bdist_wheel
running build

File “/tmp/pip-install-oprmtxyc/h5py/.eggs/Cython-3.0a5-py3.6.egg/Cython/Build/Dependencies.py”, line 1263, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /tmp/pip-install-oprmtxyc/h5py/h5py/h5a.pyx

ERROR: Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py
Running setup.py install for h5py … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-oprmtxyc/h5py/setup.py’"’"’; file=’"’"’/tmp/pip-install-oprmtxyc/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-xlfzwbc_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/h5py
cwd: /tmp/pip-install-oprmtxyc/h5py/
Complete output (201 lines):
running install
running build

cythonize_one(*args)
File “/tmp/pip-install-oprmtxyc/h5py/.eggs/Cython-3.0a5-py3.6.egg/Cython/Build/Dependencies.py”, line 1263, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /tmp/pip-install-oprmtxyc/h5py/h5py/h5a.pyx
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-oprmtxyc/h5py/setup.py’"’"’; file=’"’"’/tmp/pip-install-oprmtxyc/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-xlfzwbc_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/h5py Check the logs for full command output.

try “pip install Cython”

you may try also:

sudo apt-get install libhdf5-dev
sudo apt install cython3

thank you

after sudo apt install cython3
I installed successfully