An error after downloading the h5py package in TensorFlow

Dear all.
When I install tensorflow, which performs the following instructions: pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3 --user, after downloading p5hy package, there is an error.

Collecting h5py (from keras-applications>=1.0.6->tensorflow-gpu==1.13.1+nv19.3)
Using cached https://files.pythonhosted.org/packages/43/27/a6e7dcb8ae20a4dbf3725321058923fec262b6f7835179d78ccc8d98deec/h5py-2.9.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “/usr/lib/python3.6/urllib/request.py”, line 1318, in do_open
encode_chunked=req.has_header(‘Transfer-encoding’))
File “/usr/lib/python3.6/http/client.py”, line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1026, in _send_output
self.send(msg)
File “/usr/lib/python3.6/http/client.py”, line 964, in send
self.connect()
File “/usr/lib/python3/dist-packages/setuptools/ssl_support.py”, line 174, in connect
(self.host, self.port), getattr(self, ‘source_address’, None)
File “/usr/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 764, in open_url
    return open_with_auth(url, self.opener)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 951, in _socket_timeout
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 1070, in open_with_auth
    fp = opener(request)
  File "/usr/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3/dist-packages/setuptools/ssl_support.py", line 161, in https_open
    lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req
  File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 101] Network is unreachable>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-3ix_q_2x/h5py/setup.py", line 168, in <module>
    cmdclass = CMDCLASS,
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 128, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 774, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
    return installer(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 686, in easy_install
    not self.always_copy, self.local_index
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 653, in fetch_distribution
    dist = find(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 633, in find
    loc = self.download(dist.location, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 577, in download
    found = self._download_url(scheme.group(1), spec, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 822, in _download_url
    return self._attempt_download(url, filename)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 828, in _attempt_download
    headers = self._download_to(url, filename)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 727, in _download_to
    fp = self.open_url(url)
  File "/usr/lib/python3/dist-packages/setuptools/package_index.py", line 778, in open_url
    % (url, v.reason))
distutils.errors.DistutilsError: Download error for https://files.pythonhosted.org/packages/b4/2c/bf434cb5a6590417e1d4468050ec317ea17fd6231c2a256df4646c11e588/pkgconfig-1.5.1-py2.py3-none-any.whl#sha256=cddf2d7ecadb272178a942eb852a9dee46bda2adcc36c3416b0fef47a4ed9f38: [Errno 101] Network is unreachable

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-3ix_q_2x/h5py/

When I download h5py separately or try it again, the same error occurred in the step to p5hy. How to solve this problem?

Hi,

Could you try the following commands?

sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

Thanks.