Tensorflow2.0安装异常解决

ぐ巨炮叔叔 提交于 2020-01-10 20:59:49

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

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

安装时报错:
在这里插入图片描述在这里插入图片描述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

在这里插入图片描述
2.更新 setuptools

pip install --ignore-installed  setuptools

在这里插入图片描述3. 安装 tensorflow, 这个时候就不出现错误提示了

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

在这里插入图片描述
安装完后,在python交互环境中输入“import tensorflow as tf”命令即可验证 CPU 版本是否安装成功。
TensorFlow CPU 版本安装完成后,可以通过“tf.version”查看本地安装的TensorFlow 版本号:
在这里插入图片描述

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!