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

ERROR: Failed building wheel for grpcio 或者DEPRECATION: Python 3.5 reached the end of its life on S_第1张图片

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

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

ERROR: Failed building wheel for grpcio 或者DEPRECATION: Python 3.5 reached the end of its life on S_第2张图片

2.删除此环境

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

3.重新建立环境

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

ERROR: Failed building wheel for grpcio 或者DEPRECATION: Python 3.5 reached the end of its life on S_第3张图片

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博客

你可能感兴趣的:(python,开发语言,人工智能,机器学习)