I am trying to install botocore and boto3 package but I am getting following error
[]$ pip3 install --user botocore
Collecting botocore
Using cached botocore-1.24.39-py3-none-any.whl (8.7 MB)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /usr/local/lib/python3.7/site-packages (from botocore) (1.26.9)
Collecting python-dateutil<3.0.0,>=2.1
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
|████████ | 61 kB 5.6 MB/s eta 0:00:01ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 437, in _error_catcher
yield
File "/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib64/python3.7/http/client.py", line 461, in read
n = self.readinto(b)
File "/usr/lib64/python3.7/http/client.py", line 505, in readinto
n = self.fp.readinto(b)
File "/usr/lib64/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/lib64/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib64/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
status = self.run(options, args)
File "/usr/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
return func(self, options, args)
File "/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 344, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 184, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 391, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3.7/site-packages/pip/_internal/resolution/legacy/resolver.py", line 343, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 469, in prepare_linked_requirement
hashes=self._get_linked_req_hashes(req)
File "/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 259, in unpack_url
hashes=hashes,
File "/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 130, in get_http_url
link, downloader, temp_dir.path, hashes
File "/usr/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 282, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 168, in iter
for x in it:
File "/usr/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 88, in response_chunks
decode_content=False,
File "/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 455, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
pip._vendor.urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
It is failing at installing python-dateutil
. If I try to install this package itself separately, then also same issue.
I also tried following
pip3 install -i https://pypi.python.org/simple/ botocore
and
pip3 install --default-timeout=1000 botocore
But still it is failing with same issue. Python version I am using is 3.7.10. I am not able to figure out the possible reason behind this failure.