Tensorflow2.0安装异常解决

使用命令安装 CPU 版本的命令为:
使用国内清华源安装 TensorFlow CPU 版本

pip install -U tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

安装时报错:
Tensorflow2.0安装异常解决_第1张图片Tensorflow2.0安装异常解决_第2张图片ERROR: google-auth 1.10.0 has requirement setuptools>=40.3.0, but you’ll have setuptools 40.2.0 which is incompatible.
ERROR: tensorboard 2.0.2 has requirement setuptools>=41.0.0, but you’ll have setuptools 40.2.0 which is incompatible.
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.

解决方法
  1. 更新warpt
pip install --ignore-installed wrapt

Tensorflow2.0安装异常解决_第3张图片
2.更新 setuptools

pip install --ignore-installed  setuptools

Tensorflow2.0安装异常解决_第4张图片3. 安装 tensorflow, 这个时候就不出现错误提示了

pip install -U tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

Tensorflow2.0安装异常解决_第5张图片
安装完后,在python交互环境中输入“import tensorflow as tf”命令即可验证 CPU 版本是否安装成功。
TensorFlow CPU 版本安装完成后,可以通过“tf.version”查看本地安装的TensorFlow 版本号:
Tensorflow2.0安装异常解决_第6张图片

你可能感兴趣的:(Tensorflow2.0安装异常解决)