运行tensorflow代码的时候出现以下错误:
RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
解决方法一:
忽略警告(警告信息,其实并不影响输出结果)
输入以下TF调试代码有结果 :
import tensorflow as tf
hello = tf.constant("Hello, TensorFlow!")
sess = tf.Session()
print(sess.run(hello))
# 结果为:b'Hello, TensorFlow!'
解决方法二
建一个Python 3.5的环境,在这个环境重新安装TensorFlow,问题就可得到迎刃而解,但是采用Python 3.5的环境可能又会出现新的问题,如果你是哪种喜欢挑战,追根溯源的人可以一试。