【发布时间】:2020-05-31 01:25:57
【问题描述】:
我安装了安装 python 3.6.10 的 anaconda3.5.2。然后我安装了tensorflow2.0。 安装后,我从 cmd 控制台进入 python 并将 tensorflow 作为 tf.我输入了 tf.version,一切看起来都不错。然后我启动 spyder 并做同样的事情,导入没有给出任何错误,但是 tf.version 说 tf 没有定义。我查看了 sys.path,在这两种情况下,路径都完全相同。
感谢任何帮助和答案。
【问题讨论】:
-
澄清一下:你是如何安装 tensorflow 的?你在 anaconda 中使用了 pip install tensorflow 吗?您是否已经尝试过“tf.__version__”?
标签: tensorflow spyder