【问题标题】:Jupyter environment error, loading different tensorflow version than installedJupyter环境错误,加载与安装不同的tensorflow版本
【发布时间】:2021-06-16 17:01:01
【问题描述】:

我使用的是 ubuntu 20.04。我创建了一个新环境。

conda create -n tfgpu python=3.8 conda 激活 tfgpu pip install tensorflow-gpu==2.3 jupyter笔记本

然后我打开一个之前创建的 .ipynb 文件并尝试导入 tensorflow。 将张量流导入为 tf tf.版本

版本即将发布为 2.4.1 我在我的基础环境中安装了 tensorflow 2.4.1。即使它无关紧要,我也将其卸载。我也在其他环境中检查了 tf 2.4.1,但找不到。当我在那个笔记本上写 !pip uninstall tensorflow 时,它说 Skipping as no tensorflow installed。当我写 !pip uninstall tensorflow-gpu 时,它卸载了 tensorflow==2.3。之后它仍然能够导入 2.4.1 版本的 tensorflow。我不明白发生了什么。我可以说我曾经也安装过 tf-nightly 但在不同的环境中。我认为这与安装路径有关,或者与环境名称有什么关系。这真的很烦人,任何帮助表示赞赏。谢谢。

【问题讨论】:

    标签: python tensorflow jupyter-notebook version


    【解决方案1】:

    我错过了安装 jupyter notebook。我还不明白发生了什么,但我的错误是。问题已解决。

    【讨论】:

      猜你喜欢
      • 2021-09-29
      • 2020-11-02
      • 1970-01-01
      • 2020-01-03
      • 1970-01-01
      • 2020-03-22
      • 2019-07-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多