这是我遇到的错误。这个你能帮我吗。我尝试了所有安装Tensorflow的方法。我在Windows 10、64位上。 另外,我在ubuntu上也遇到类似的错误,但是我现在想要Windows的解决方案。请帮我解决这个问题。
命令:
C:\Users\chatbot>py -m pip install tensorflow
Collecting tensorflow
Downloading https://files.pythonhosted.org/packages/f7/08/25e47a53692c2e0dcd2211a493ddfe9007a5cd92e175d6dffa6169a0b392/tensorflow-1.14.0-cp37-cp37m-win_amd64.whl (68.3MB)
|██ | 4.7MB 17kB/s eta 1:00:29
错误:
Collecting tensorflow
Downloading https://files.pythonhosted.org/packages/bf/4a/5c86ed8b245aa48f9f819b13a0a9039e9126ba19fdd0c7e0b8026c12315a/tensorflow-1.14.0-cp36-cp36m-win_amd64.whl (68.3MB)
|███████████████████████████████ | 66.1MB 32kB/s eta 0:01:08ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\urllib3\response.py", line 397, in _error_catcher
yield
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\urllib3\response.py", line 479, in read
data = self._fp.read(amt)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "C:\ProgramData\Anaconda3\lib\http\client.py", line 449, in read
n = self.readinto(b)
File "C:\ProgramData\Anaconda3\lib\http\client.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:\ProgramData\Anaconda3\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:\ProgramData\Anaconda3\lib\ssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:\ProgramData\Anaconda3\lib\ssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:\ProgramData\Anaconda3\lib\ssl.py", line 631, in read
v = 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\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\cli\base_command.py", line 188, in main
status = self.run(options, args)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\commands\install.py", line 345, in run
resolver.resolve(requirement_set)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\legacy_resolve.py", line 196, in resolve
self._resolve_one(requirement_set, req)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\legacy_resolve.py", line 307, in _get_abstract_dist_for
self.require_hashes
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\operations\prepare.py", line 199, in prepare_linked_requirement
progress_bar=self.progress_bar
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 1064, in unpack_url
progress_bar=progress_bar
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 924, in unpack_http_url
progress_bar)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 1152, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 861, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\utils\hashes.py", line 75, in check_against_chunks
for chunk in chunks:
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 829, in written_chunks
for chunk in chunks:
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\utils\ui.py", line 156, in iter
for x in it:
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_internal\download.py", line 818, in resp_read
decode_content=False):
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\urllib3\response.py", line 531, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\urllib3\response.py", line 496, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Users\samra\AppData\Roaming\Python\Python36\site-packages\pip\_vendor\urllib3\response.py", line 402, 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.