Tensorflow各种安装报错记录

Tensorflow2各种安装报错记录

我的环境:

  • Win10
  • Python3.6
  • tensorflow-2.2.0(希望安装)
  1. 使用清华源的前提下,安装一直断线
(py3_keras) λ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tensorflow
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/72/b8/2ef7057c956f1062ffab750a90a6bdcd3de127fb696fb64583c2dfe77aab/tensorflow-2.2.0-cp36-cp36m-win_amd64.whl (459.1 MB)
     |██████                          | 84.9 MB 595 kB/s eta 0:10:29ERROR: Exception:
Traceback (most recent call last):
  File "c:\applications\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 425, in _error_catcher
    yield
  File "c:\applications\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:\applications\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "c:\applications\anaconda3\lib\http\client.py", line 449, in read
    n = self.readinto(b)
  File "c:\applications\anaconda3\lib\http\client.py", line 493, in readinto
    n = self.fp.readinto(b)
  File "c:\applications\anaconda3\lib\socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "c:\applications\anaconda3\lib\ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "c:\applications\anaconda3\lib\ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "c:\applications\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:

解决方案:

  • 使用小梯子
  1. 出现ERROR: Cannot uninstall 'wrapt'
(py3_keras) λ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:833)'),)': /simple/tensorflow/
Collecting tensorflow
...
...
...
Installing collected packages: gast, h5py, astunparse, tensorboard, wrapt, tensorflow-estimator, tensorflow
  Attempting uninstall: gast
    Found existing installation: gast 0.2.2
    Uninstalling gast-0.2.2:
      Successfully uninstalled gast-0.2.2
  Attempting uninstall: h5py
    Found existing installation: h5py 2.7.1
    Uninstalling h5py-2.7.1:
      Successfully uninstalled h5py-2.7.1
  Attempting uninstall: tensorboard
    Found existing installation: tensorboard 2.1.1
    Uninstalling tensorboard-2.1.1:
      Successfully uninstalled tensorboard-2.1.1
  Attempting uninstall: wrapt
    Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

解决方案:

  • pip install -U --ignore-installed wrapt enum34 simplejson netaddr

参考:

  1. 解决windows安装TensorFlow2.0beta版本时ERROR: Cannot uninstall 'wrapt’问题

你可能感兴趣的:(Tensorflow记录)