在命令外殼錯誤下方,(base) C:\Users\ImdaduL Haque> pip install --user --upgrade tensorflow-gpuWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/tensorflow-gpu/Collecting tensorflow-gpu Downloading tensorflow_gpu-2.3.0-cp37-cp37m-win_amd64.whl (344.1 MB) |██▌ | 28.1 MB 198 kB/s eta 0:26:33ERROR: Exception:Traceback (most recent call last): File "c:\users\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 437, in _error_catcher yield File "c:\users\imdadul haque\anaconda3\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\imdadul haque\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read data = self.__fp.read(amt) File "c:\users\imdadul haque\anaconda3\lib\http\client.py", line 447, in read n = self.readinto(b) File "c:\users\imdadul haque\anaconda3\lib\http\client.py", line 491, in readinto n = self.fp.readinto(b) File "c:\users\imdadul haque\anaconda3\lib\socket.py", line 589, in readinto return self._sock.recv_into(b) File "c:\users\imdadul haque\anaconda3\lib\ssl.py", line 1052, in recv_into return self.read(nbytes, buffer) File "c:\users\imdadul haque\anaconda3\lib\ssl.py", line 911, in read return self._sslobj.read(len, buffer)運行命令pip install --user --upgrade tensorflow-gpu后顯示上述錯誤,我沒有解決這個問題。 注意:我不為低版本的 tensorflow 運行 keras,這就是為什么我在上面使用這些 commond 但它顯示錯誤。在我之前的問題鏈接下方,我說了 tensorflow 版本的問題。tensorflow 版本的問題鏈接
2 回答

飲歌長嘯
TA貢獻1951條經驗 獲得超3個贊
發生這種情況是因為您的互聯網連接較弱。使用相同的命令重試。或者您可以使用以下命令來增加等待時間:
pip --default-timeout=100 install --user --upgrade tensorflow-gpu

慕桂英546537
TA貢獻1848條經驗 獲得超10個贊
從 2.0 版開始,沒有特定于 gpu 或 cpu 的 tensorflow 版本。如果您只使用pip install tensorflow
,您將同時安裝 cpu 和 gpu 版本。如果你想為 cpu 或 gpu 安裝,你只能為 tensorflow v1.x 安裝它們。
添加回答
舉報
0/150
提交
取消