Failed install tensorflow on jetpack 4.6

Installation of tensorflow fails
jet pack4.6
python3.6
jetson nano

sudo -H pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v46 tensorflow==2.5.0+nv21.8
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v46
Collecting tensorflow==2.5.0+nv21.8
  Using cached https://developer.download.nvidia.com/compute/redist/jp/v46/tensorflow/tensorflow-2.5.0%2Bnv21.8-cp36-cp36m-linux_aarch64.whl (313.8 MB)
Collecting h5py~=2.10.0
  Using cached h5py-2.10.0.tar.gz (301 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: termcolor~=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.1.0)
Requirement already satisfied: six~=1.15.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.15.0)
Requirement already satisfied: numpy~=1.19.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.19.5)
Requirement already satisfied: opt-einsum~=3.3.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (3.3.0)
Requirement already satisfied: tensorflow-estimator<2.6.0,>=2.5.0rc0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (2.5.0)
Requirement already satisfied: wrapt~=1.12.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.12.1)
Requirement already satisfied: keras-nightly~=2.5.0.dev in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (2.5.0.dev2021032900)
Requirement already satisfied: typing-extensions~=3.7.4 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (3.7.4.3)
Requirement already satisfied: protobuf>=3.9.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (3.19.6)
Requirement already satisfied: wheel~=0.35 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (0.37.1)
Requirement already satisfied: keras-preprocessing~=1.1.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.1.2)
Requirement already satisfied: grpcio~=1.34.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (1.34.1)
Requirement already satisfied: absl-py==0.12.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (0.12.0)
Collecting gast==0.4.0
  Using cached gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting astunparse~=1.6.3
  Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: google-pasta~=0.2 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (0.2.0)
Collecting flatbuffers~=1.12.0
  Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: tensorboard~=2.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow==2.5.0+nv21.8) (2.10.1)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2.27.1)
Requirement already satisfied: setuptools>=41.0.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (59.6.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (0.6.1)
Requirement already satisfied: werkzeug>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2.0.3)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (3.3.7)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (0.4.6)
Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2.14.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (1.8.1)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from google-auth<3,>=1.6.3->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (4.2.4)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.6/dist-packages (from google-auth<3,>=1.6.3->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (4.9)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.6/dist-packages (from google-auth<3,>=1.6.3->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (0.3.0rc1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (1.3.1)
Requirement already satisfied: importlib-metadata>=4.4 in /usr/local/lib/python3.6/dist-packages (from markdown>=2.6.8->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (4.8.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.6/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2018.1.18)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (1.22)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests<3,>=2.21.0->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (2.6)
Requirement already satisfied: dataclasses in /usr/local/lib/python3.6/dist-packages (from werkzeug>=1.0.1->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (0.8)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (3.6.0)
Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.6/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (0.5.0rc2)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow==2.5.0+nv21.8) (3.2.2)
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 io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-s5eptv3h
       cwd: /tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/
  Complete output (41 lines):
  /usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning: 0.18ubuntu0.18.04.1 is an invalid version and will not be supported in a future release
    PkgResourcesDeprecationWarning,
  /usr/local/lib/python3.6/dist-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
    SetuptoolsDeprecationWarning,
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fab85f5c0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fab85f748>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fab85f8d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fab85fa20>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fab85fb70>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
  ERROR: Could not find a version that satisfies the requirement pkgconfig (from versions: none)
  ERROR: No matching distribution found for pkgconfig
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 82, in fetch_build_egg
      subprocess.check_call(cmd)
    File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpgrpv58e9', '--quiet', 'pkgconfig']' returned non-zero exit status 1.
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py", line 159, in <module>
      cmdclass = CMDCLASS,
    File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 815, in fetch_build_eggs
      replace_conflicting=True,
    File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 773, in resolve
      replace_conflicting=replace_conflicting
    File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1056, in best_match
      return self.obtain(req, installer)
    File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1068, in obtain
      return installer(requirement)
    File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 883, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 84, in fetch_build_egg
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpgrpv58e9', '--quiet', 'pkgconfig']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for h5py
  Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py, gast, flatbuffers, astunparse, tensorflow
  Attempting uninstall: h5py
    Found existing installation: h5py 2.7.1
    Uninstalling h5py-2.7.1:
      Successfully uninstalled h5py-2.7.1
    Running setup.py install for h5py ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-knms29nz/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/h5py
         cwd: /tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/
    Complete output (41 lines):
    /usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning: 0.18ubuntu0.18.04.1 is an invalid version and will not be supported in a future release
      PkgResourcesDeprecationWarning,
    /usr/local/lib/python3.6/dist-packages/setuptools/installer.py:30: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
      SetuptoolsDeprecationWarning,
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8a07e518>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8a07e6a0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8a07e898>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8a07e9e8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f8a07eb38>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pkgconfig/
    ERROR: Could not find a version that satisfies the requirement pkgconfig (from versions: none)
    ERROR: No matching distribution found for pkgconfig
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 82, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa9agzw82', '--quiet', 'pkgconfig']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py", line 159, in <module>
        cmdclass = CMDCLASS,
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 815, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 773, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1056, in best_match
        return self.obtain(req, installer)
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1068, in obtain
        return installer(requirement)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 883, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 84, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa9agzw82', '--quiet', 'pkgconfig']' returned non-zero exit status 1.
    ----------------------------------------
  Rolling back uninstall of h5py
  Moving to /usr/lib/python3/dist-packages/h5py
   from /usr/lib/python3/dist-packages/~5py
  Moving to /usr/lib/python3/dist-packages/h5py-2.7.1.egg-info
   from /usr/lib/python3/dist-packages/~5py-2.7.1.egg-info
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4giaqo6x/h5py_ac151e1cf1cf4dafb4406e2ea71315b5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-knms29nz/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/h5py Check the logs for full command output.

Hi,

Have you run the “Prerequisites and Dependencies” first?

Could you install h5py with the following command?

$ sudo pip3 install -U h5py

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.