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.

Command errored out with exit status -4: while installing h5py

See original GitHub issue

I try to install h5py 2.10.0 in the Jetson Nano, always get the error that Command errored out with exit status -4. I search a long time for a solution, I install cython (pip3 install Cython), I also pre-install the package dependencies.(sudo apt-get ). However, None of the solutions work for me either git clone the repository directly and install. Can anyone please help? The error logs for reference:

    ERROR: Command errored out with exit status -4:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jja5oowt/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-jja5oowt/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-zufa6fjz/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/jetson/.local/include/python3.6m/h5py
         cwd: /tmp/pip-req-build-jja5oowt/
    Complete output (62 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.6
    creating build/lib.linux-aarch64-3.6/h5py
    copying h5py/__init__.py -> build/lib.linux-aarch64-3.6/h5py
    copying h5py/ipy_completer.py -> 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/highlevel.py -> build/lib.linux-aarch64-3.6/h5py
    creating build/lib.linux-aarch64-3.6/h5py/_hl
    copying h5py/_hl/__init__.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/vds.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/selections2.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/selections.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/files.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/attrs.py -> build/lib.linux-aarch64-3.6/h5py/_hl
    copying h5py/_hl/compat.py -> build/lib.linux-aarch64-3.6/h5py/_hl
    copying h5py/_hl/base.py -> build/lib.linux-aarch64-3.6/h5py/_hl
    creating 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/__init__.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_deprecation.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_dataset_swmr.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_objects.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_dtype.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_selections.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/common.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_h5.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_attrs.py -> build/lib.linux-aarch64-3.6/h5py/tests
    copying h5py/tests/test_threads.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_h5f.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_h5t.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_file_image.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_base.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_h5pl.py -> build/lib.linux-aarch64-3.6/h5py/tests
    copying h5py/tests/test_h5p.py -> build/lib.linux-aarch64-3.6/h5py/tests
    creating 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/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
    running build_ext
    ----------------------------------------
ERROR: Command errored out with exit status -4: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jja5oowt/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-jja5oowt/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-zufa6fjz/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/jetson/.local/include/python3.6m/h5py Check the logs for full command output.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
simonfojtucommented, Apr 19, 2021

I’ve seen the same error as OP, when I had numpy==1.19.5 installed. I managed to install h5py-2.10.0 when downgrading to numpy==1.19.3:

$ python3 -m venv-np1.19.3
$ pip install -U setuptools pip
...
Successfully installed pip-21.0.1 setuptools-56.0.0
$ pip install numpy==1.19.3
...
Successfully installed numpy-1.19.3
$ pip install h5py
Collecting h5py
  Using cached h5py-2.10.0.tar.gz (301 kB)
Requirement already satisfied: numpy>=1.7 in ./venv-np1.19.3/lib/python3.6/site-packages (from h5py) (1.19.3)
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Using legacy 'setup.py install' for h5py, since package 'wheel' is not installed.
Installing collected packages: six, h5py
    Running setup.py install for h5py ... done
Successfully installed h5py-2.10.0 six-1.15.0

using python-3.6

1reaction
biswadipmaitycommented, Jun 24, 2021

Indeed it was related ! Thanks for the insight… Downgrading numpy (from 1.19.5) to 1.19.4 solved it for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install h5py on windows using pip - Stack Overflow
I had this problem too when attempting to install keras, but this command helped me to install all dependencies needed for h5py (and...
Read more >
Cython errors when compiling h5py with pip - Google Groups
Installing collected packages: numpy, six, h5py. Running setup.py install for h5py ... error. ERROR: Command errored out with exit status 1:.
Read more >
Unable to install h5py in virtualenv with pip3 - Ask Ubuntu
You have to install build-dependencies for the python3-h5py package. At first you need to enable Source Code repositories in Software ...
Read more >
Not able to install tensor flow-macos - Apple Developer
... able to install tensorflow-macos on m1 pro chip in my MacBook Pro then I'm receiving the following error. ERROR: Command errored out...
Read more >
Installation — h5py 3.7.0 documentation
Make sure that that you have the development headers, as they are usually not installed by default. They can usually be found in...
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