I am actively trying to get into machine learning, but while i was trying to install tensor flow on my system it kept giving me errors. I am using python 3.7.3 64bit for windows. I have tried different means to install it with no progress. This is the error below,help will be appreciated
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\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\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
resolver.resolve(requirement_set)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
hashes=hashes,
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 287, in unpack_url
hashes=hashes,
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 159, in unpack_http_url
link, downloader, temp_dir.path, hashes
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\ui.py", line 160, in iter
for x in it:
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
decode_content=False,
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\ishola taofeek\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, 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.
As mentioned in this Question.
pip has an default timeout of 15 sec. When trying to install a big file (especially when using slow wifi), this may not be enough.. To fix this just set pip to take longer (for example 1000 sec).
pip install --default-timeout=1000 install tensorflow
Something went wrong when trying to download a certain file (for chunk in download.chunks: gives the hint). In short, you have internet issues. Could be a lot.
Related
When I've been attempting to install CUDA through Command Prompt, I get the following errors and have no idea how to fix them.
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "c:\users\silasm\appdata\local\programs\python\python39\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\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\http\client.py", line 459, in read
n = self.readinto(b)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\http\client.py", line 503, in readinto
n = self.fp.readinto(b)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\ssl.py", line 1099, 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\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
status = self.run(options, args)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapper
return func(self, options, args)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
requirement_set = resolver.resolve(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 94, in resolve
result = self._result = resolver.resolve(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 472, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
return bool(self._sequence)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 140, in __bool__
return any(self)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 128, in <genexpr>
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 32, in _iter_built
candidate = func()
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 204, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 295, in __init__
super().__init__(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
self.dist = self._prepare()
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 227, in _prepare
dist = self._prepare_distribution()
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 305, in _prepare_distribution
return self._factory.preparer.prepare_linked_requirement(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py", line 508, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py", line 550, in _prepare_linked_requirement
local_file = unpack_url(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py", line 239, in unpack_url
file = get_http_url(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\operations\prepare.py", line 102, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\network\download.py", line 145, in __call__
for chunk in chunks:
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\cli\progress_bars.py", line 144, in iter
for x in it:
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\contextlib.py", line 135, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\silasm\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out.
Any help would be much appreciated as I don't know how to fix this.
Also, everytime I try opening a Python file, it immediately shuts down after booting up. I assume this has something to do with conflicting versions of Python, but I have uninstalled all versions and reinstalled just 3.9. If there is something I can use to completely rid my computer of all things Python in order to start from the ground up, I would appreciate it very much as I've had more than just this problem when it comes to Python.
First, it looks like a temporary network issue. you can try to rerun the same command, and hopefully it is working. good luck out there.
Second, for different python versions, it is better to use conda to manage it. reference: https://docs.anaconda.com/anaconda/install/index.html
I tried installing tensorflow but I got this KeyError:
>py -3.7-64 -m pip install tensorflow
Collecting tensorflow
Downloading tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB)
|██ | 20.2 MB 3.3 MB/s eta 0:01:47ERROR: Exception:
Traceback (most recent call last):
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'tensorflow'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\...\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher
yield
File "C:\...\Python37\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:\...\Python37\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "C:\...\Python37\lib\http\client.py", line 461, in read
n = self.readinto(b)
File "C:\...\Python37\lib\http\client.py", line 505, in readinto
n = self.fp.readinto(b)
File "C:\...\Python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\...\Python37\lib\ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "C:\...\Python37\lib\ssl.py", line 929, 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:\...\Python37\lib\site-packages\pip\_internal\cli\base_command.py", line 189, in _main
status = self.run(options, args)
File "C:\...\Python37\lib\site-packages\pip\_internal\cli\req_command.py", line 178, in wrapper
return func(self, options, args)
File "C:\...\Python37\lib\site-packages\pip\_internal\commands\install.py", line 317, in run
reqs, check_supported_wheels=not options.target_dir
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 453, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 318, in resolve
name, crit = self._merge_into_criterion(r, parent=None)
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _merge_into_criterion
crit = Criterion.from_requirement(self._p, requirement, parent)
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 82, in from_requirement
if not cands:
File "C:\...\Python37\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 124, in __bool__
return bool(self._sequence)
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in __bool__
return any(self)
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 38, in _iter_built
candidate = func()
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 169, in _make_candidate_from_link
name=name, version=version,
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 306, in __init__
version=version,
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 144, in __init__
self.dist = self._prepare()
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 226, in _prepare
dist = self._prepare_distribution()
File "C:\...\Python37\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 312, in _prepare_distribution
self._ireq, parallel_builds=True,
File "C:\...\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 457, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "C:\...\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in _prepare_linked_requirement
self.download_dir, hashes,
File "C:\...\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 234, in unpack_url
hashes=hashes,
File "C:\...\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 108, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "C:\...\Python37\lib\site-packages\pip\_internal\network\download.py", line 163, in __call__
for chunk in chunks:
File "C:\...\Python37\lib\site-packages\pip\_internal\cli\progress_bars.py", line 159, in iter
for x in it:
File "C:\...\Python37\lib\site-packages\pip\_internal\network\utils.py", line 88, in response_chunks
decode_content=False,
File "C:\...\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\...\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "C:\...\Python37\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "C:\...\Python37\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, 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.
Then I tried installing it using a virtual environment (venv), and the progress bar went a bit further this time, but it still threw pretty much the same error.
Any ideas how to fix this?
Thanks.
Just use --default-timeout=100 parameter with the install. e.g
py -3.7-64 -m pip install --default-timeout=100 tensorflow
I hope, this will help you.
I've tried a lot of methods but useless. Finally I have to reinstalled my python and it works.
When try I to install tensorflow using pip like this
pip install tensorflow
It gives me the following error:
Collecting tensorflow
Downloading tensorflow-2.3.1-cp38-cp38-win_amd64.whl (342.5 MB)
| | 3.4 MB 12 kB/s eta 7:44:02ERROR: Exception:
Traceback (most recent call last):
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 437, in _error_catcher
yield
File "c:\users\win 10\appdata\local\programs\python\python38\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\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\http\client.py", line 458, in read
n = self.readinto(b)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\http\client.py", line 502, in readinto
n = self.fp.readinto(b)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\ssl.py", line 1099, 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\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 228, in _main
status = self.run(options, args)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
return func(self, options, args)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\commands\install.py", line 323, in run
requirement_set = resolver.resolve(
File "c:\users\win 10\appdata\local\programs\python\python38\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\win 10\appdata\local\programs\python\python38\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\win 10\appdata\local\programs\python\python38\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\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\operations\prepare.py", line 467, in prepare_linked_requirement
local_file = unpack_url(
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\operations\prepare.py", line 255, in unpack_url
file = get_http_url(
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\operations\prepare.py", line 129, in get_http_url
from_path, content_type = _download_http_url(
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\operations\prepare.py", line 282, in _download_http_url
for chunk in download.chunks:
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\progress_bars.py", line 168, in iter
for x in it:
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\network\utils.py", line 64, in response_chunks
for chunk in response.raw.stream(
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\win 10\appdata\local\programs\python\python38\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\win 10\appdata\local\programs\python\python38\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.
What does the error means and how can I install it?
And if I do a google search on how to install tensorflow it tells me to download it from a virtual environment, I don't know how to create virtual environment
As commented by #Dr. Snoopy, error looks like connection issue.
Tensorflow 2.2 or later versions requires Python 3.8.For more please go through official website of Tensorflow.
As suggested by #Raghav Gupta, conda takes care of package versions incompatibility.
conda create --name tf python=3.8 tensorflow #install python 3.8 and latest version of Tensorflow
I am installing this on anaconda and python ide too but getting the same error tried adjusting paths too.
Downloading opencv_python-4.4.0.42-cp37-cp37m-win_amd64.whl (33.5 MB)
|█████ | 5.3 MB 40 kB/s eta 0:11:43ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "C:\Users\Uma sri\anaconda3\lib\http\client.py", line 457, in read
n = self.readinto(b)
File "C:\Users\Uma sri\anaconda3\lib\http\client.py", line 501, in readinto
n = self.fp.readinto(b)
File "C:\Users\Uma sri\anaconda3\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\Users\Uma sri\anaconda3\lib\ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\Uma sri\anaconda3\lib\ssl.py", line 929, 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\Uma sri\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
resolver.resolve(requirement_set)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 482, in prepare_linked_requirement
hashes=hashes,
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 287, in unpack_url
hashes=hashes,
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 159, in unpack_http_url
link, downloader, temp_dir.path, hashes
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\utils\ui.py", line 160, in iter
for x in it:
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_internal\network\utils.py", line 39, in response_chunks
decode_content=False,
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "C:\Users\Uma sri\anaconda3\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\Uma sri\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 430, 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.
The Anaconda installer is trying to establish a connection to download the packages, however it is failing to do so. Please check your internet connection and try re-installing.
here is the problem
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1197, in prepare_files
do_download,
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1375, in unpack_url
self.session,
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 572, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 433, in _download_url
for chunk in resp_read(4096):
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 421, in resp_read
chunk_size, decode_content=False):
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 225, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/lib/python2.7/dist-packages/urllib3/response.py", line 174, in read
data = self._fp.read(amt)
File "/usr/lib/python2.7/httplib.py", line 567, in read
s = self.fp.read(amt)
File "/usr/lib/python2.7/socket.py", line 380, in read
data = self._sock.recv(left)
File "/usr/lib/python2.7/ssl.py", line 341, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 260, in read
return self._sslobj.read(len)
SSLError: The read operation timed out
Storing debug log for failure in /home/eason/.pip/pip.log
Learn how to read error messages:
SSLError: The read operation timed out
It means that the server didn't respond anything for some time. The server might be busy or bugged. You should try to install again later.
You might want to call pip with a bigger timeout value if you have a lot of latency.
pip --default-timeout=120 install ...
It will timeout after 120 seconds of waiting. The default should be 60 seconds.
Check the pip's documentation here: https://pip.pypa.io/en/latest/user_guide.html