tensorflow2.0安装

版本:

python3.5

tensorflow2.0 cpu版本

1、安装命令

pip3 install tensorflow==2.0.0.0a0 -i  https://pypi.tuna.tsinghua.edu.cn/simple/ (-i表示重新指定镜像,提高下载速度)

2、报错以及解决方法

(1)报错: “Cannot remove entries from nonexistent file c:\program files\anaconda3\lib\site-packages\easy-install.pth”

  解决方案:pip install --upgrade --ignore-installed setuptools

(2)报错:“Cannot uninstall 'Werkzeug'. 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”、、

  解决方案:pip3 install  --ignore-installed Werkzeug tensorflow==2.0.0.0a0 -i  https://pypi.tuna.tsinghua.edu.cn/simple/

3、成功安装后 import tensorflow as tf 报警:“ FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'”

  原因:numpy 的版本过低或者过高都会出现警告

  解决方案:需要先卸载现有的numpy,并重新指定1.16.4版本的numpy

  pip3 uninstall numpy

  pip3 install numpy==1.16.4 -i  https://pypi.tuna.tsinghua.edu.cn/simple/

转载于:https://www.cnblogs.com/guozw/p/11481387.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值