【发布时间】:2021-02-27 07:06:58
【问题描述】:
我尝试使用 pip install tensorflow 安装 TensorFlow,但出现以下错误。是因为超时问题吗?安装TensorFlow时如何解决这个错误?
ERROR: Exception:
Traceback (most recent call last):
File "c:\users\hp\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "c:\users\hp\appdata\local\programs\python\python38\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\hp\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\hp\appdata\local\programs\python\python38\lib\http\client.py", line 454, in read
n = self.readinto(b)
File "c:\users\hp\appdata\local\programs\python\python38\lib\http\client.py", line 498, in readinto
n = self.fp.readinto(b)
File "c:\users\hp\appdata\local\programs\python\python38\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "c:\users\hp\appdata\local\programs\python\python38\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\hp\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
【问题讨论】:
-
您使用的是 conda 环境吗?如果不尝试:
pip --default-timeout=300 install tensorflow
标签: python tensorflow machine-learning pip