Tensorflow2.0安装异常解决

使用命令安装 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 版本号:
在这里插入图片描述

发布了7 篇原创文章 · 获赞 1 · 访问量 553

猜你喜欢

转载自blog.csdn.net/qq_40247920/article/details/103892696
今日推荐