【问题标题】:Using tflearn, getting ModuleNotFoundError: No module named 'tensorflow.contrib'使用 tflearn,得到 ModuleNotFoundError: No module named 'tensorflow.contrib'
【发布时间】:2020-08-28 10:20:09
【问题描述】:

我正在使用 tensorflow==2.2.0rc1 和 tflearn==0.3.2 并且在导入时我不断收到相同的错误:

ModuleNotFoundError: No module named 'tensorflow.contrib'

虽然我导入了包:

import tflearn
import tensorflow

【问题讨论】:

  • 请分享整个错误输出。

标签: tensorflow tflearn


【解决方案1】:

从TFLearn的documentation和你的错误来看,它可能只兼容Tensorflow tensorflow.contrib 在 Tensorflow 2 中是 deprecated。

【讨论】:

  • 是的,但我只能安装 2.* 版本。我试过了,它说:找不到满足要求 tensorflow==1.* 的版本(来自版本:2.2.0rc1、2.2.0rc2、2.2.0rc3、2.2.0rc4、2.2.0、2.3.0rc0 , 2.3.0rc1, 2.3.0rc2, 2.3.0)
  • 如果你使用 pip,试试pip install --upgrade tensorflow==1.14
猜你喜欢
  • 1970-01-01
  • 2022-12-27
  • 2022-12-27
  • 2022-12-19
  • 2020-02-10
  • 1970-01-01
  • 1970-01-01
  • 2022-08-24
  • 2022-10-17
相关资源
最近更新 更多