ERROR: Failed building wheel for grpcio 或者DEPRECATION: Python 3.5 reached the end of its life on S

 像上面这样的错误,是因为这一行就已经出现问题了:

DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.

他的意思是Python3.5要挂掉了,所以你不要配置Python3.5,你可以用Python3.8(我的就是3.8),在此之前,你要删掉现在的一些东西,输入下面的指令就好了:

1.退出建立的环境

deactivate

2.删除此环境

 conda remove -n tensorflow --all(红色字体改成你的环境名,我设置的是tensorflow)

3.重新建立环境

conda create -n tensorflow1 python=3.8(我的是python=3.8,其他的我不知道,这个3.8可以的)

4.安装tensorflow

pip install tensorflow

5.测试tensorflow(用我的测试吧,网上好多的教程的测试代码都已经老掉牙了,根本没办法用)

import tensorflow as tf
tf.compat.v1.disable_eager_execution() 
hello = tf.constant('hello,tensorflow')
sess= tf.compat.v1.Session()
print(sess.run(hello))
 


参考链接:https://blog.csdn.net/weixin_45935201/article/details/120694522

下面这个也不错,大家可以参考学习学习。避免踩坑,我不知道以后这个东西会不会变化,不过至少我发现之前python=3.5是不行的,我浪费了很多时间,希望大家从我这开始,学习更新的一些东西来解决问题

(24条消息) RuntimeError: The Session graph is empty. Add operations to the graph before calling run().解决方法_爱学习的人工智障的博客-CSDN博客

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值