繁体   English   中英

安装Tensorflow时出现错误如何解决?

[英]How to solve the error in installing Tensorflow?

我尝试使用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第一次运行:

conda config --set ssl_verify no

之后修改您的默认超时:

pip --default-timeout=900 install tensorflow 

注意: conda config --set ssl_verify no仅适用于conda如果您不在conda env 上,请跳过此步骤。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM