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 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
Complete output from command python egg_info:
Traceback (most recent call last):
File “/usr/lib/python3.6/urllib/”, line 1318, in do_open
File “/usr/lib/python3.6/http/”, line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/”, line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/”, line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/”, line 1026, in _send_output
File “/usr/lib/python3.6/http/”, line 964, in send
File “/usr/lib/python3/dist-packages/setuptools/”, line 174, in connect
(, self.port), getattr(self, ‘source_address’, None)
File “/usr/lib/python3.6/”, line 724, in create_connection
raise err
File “/usr/lib/python3.6/”, line 713, in create_connection
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/", line 764, in open_url
    return open_with_auth(url, self.opener)
  File "/usr/lib/python3/dist-packages/setuptools/", line 951, in _socket_timeout
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/setuptools/", line 1070, in open_with_auth
    fp = opener(request)
  File "/usr/lib/python3.6/urllib/", line 526, in open
    response = self._open(req, data)
  File "/usr/lib/python3.6/urllib/", line 544, in _open
    '_open', req)
  File "/usr/lib/python3.6/urllib/", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3/dist-packages/setuptools/", line 161, in https_open
    lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req
  File "/usr/lib/python3.6/urllib/", 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/", line 168, in <module>
    cmdclass = CMDCLASS,
  File "/usr/lib/python3/dist-packages/setuptools/", line 128, in setup
  File "/usr/lib/python3/dist-packages/setuptools/", line 123, in _install_setup_requires
  File "/usr/lib/python3/dist-packages/setuptools/", line 513, in fetch_build_eggs
  File "/usr/lib/python3/dist-packages/pkg_resources/", line 774, in resolve
  File "/usr/lib/python3/dist-packages/pkg_resources/", line 1057, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3/dist-packages/pkg_resources/", line 1069, in obtain
    return installer(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/", line 580, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python3/dist-packages/setuptools/command/", line 686, in easy_install
    not self.always_copy, self.local_index
  File "/usr/lib/python3/dist-packages/setuptools/", line 653, in fetch_distribution
    dist = find(requirement)
  File "/usr/lib/python3/dist-packages/setuptools/", line 633, in find
    loc =, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/", line 577, in download
    found = self._download_url(, spec, tmpdir)
  File "/usr/lib/python3/dist-packages/setuptools/", line 822, in _download_url
    return self._attempt_download(url, filename)
  File "/usr/lib/python3/dist-packages/setuptools/", line 828, in _attempt_download
    headers = self._download_to(url, filename)
  File "/usr/lib/python3/dist-packages/setuptools/", line 727, in _download_to
    fp = self.open_url(url)
  File "/usr/lib/python3/dist-packages/setuptools/", line 778, in open_url
    % (url, v.reason))
distutils.errors.DistutilsError: Download error for [Errno 101] Network is unreachable


Command “python 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?


Could you try the following commands?

sudo apt-get install python3-pip libhdf5-serial-dev hdf5-tools
sudo pip3 install --pre --extra-index-url tensorflow-gpu