0

Below the command shell error,

(base) C:\Users\ImdaduL Haque> pip install --user --upgrade tensorflow-gpu
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/tensorflow-gpu/
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-2.3.0-cp37-cp37m-win_amd64.whl (344.1 MB)
     |██▌                             | 28.1 MB 198 kB/s eta 0:26:33ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 437, in _error_catcher
    yield
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "c:\users\imdadul haque\anaconda3\lib\http\client.py", line 447, in read
    n = self.readinto(b)
  File "c:\users\imdadul haque\anaconda3\lib\http\client.py", line 491, in readinto
    n = self.fp.readinto(b)
  File "c:\users\imdadul haque\anaconda3\lib\socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "c:\users\imdadul haque\anaconda3\lib\ssl.py", line 1052, in recv_into
    return self.read(nbytes, buffer)
  File "c:\users\imdadul haque\anaconda3\lib\ssl.py", line 911, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 216, in _main
    status = self.run(options, args)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 325, in run
    reqs, check_supported_wheels=not options.target_dir
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\resolution\legacy\resolver.py", line 340, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 469, in prepare_linked_requirement
    hashes=self._get_linked_req_hashes(req)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 259, in unpack_url
    hashes=hashes,
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 130, in get_http_url
    link, downloader, temp_dir.path, hashes
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 282, in _download_http_url
    for chunk in download.chunks:
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 168, in iter
    for x in it:
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_internal\network\utils.py", line 88, in response_chunks
    decode_content=False,
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "c:\users\imdadul haque\anaconda3\lib\contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 442, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

(base) C:\Users\ImdaduL Haque>

After run the command pip install --user --upgrade tensorflow-gpu it show the aboves error and I don't solve this issue. Note: I don't run keras for low version of tensorflow, that's why i use these above commond but it's show the error. below my previous questions link where i said the tensorflow version's issue.

tensorflow version's issue link

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Imdadul Haque
  • 1,635
  • 5
  • 23
  • 44

2 Answers2

0

This happened because of your weak internet connection. Try again with the same command. Or you can use the following command to increase waiting time:

pip --default-timeout=100 install --user --upgrade tensorflow-gpu
Nazmul Hasan
  • 860
  • 6
  • 17
  • Thanks brother! May be your are right because it is true that I am in low quality internet connection because of leaving dhaka for the covid-19. – Imdadul Haque Aug 29 '20 at 04:51
0

There is no gpu or cpu specific version of tensorflow from version 2.0 onwards. If you just use pip install tensorflow, you'll install both cpu and gpu versions. I you want to install for a cpu or gpu, you can install them for tensorflow v1.x only.

Jodh Singh
  • 384
  • 3
  • 13