简体   繁体   English

ModuleNotFoundError:没有名为“tensorflow.contrib”的模块与 jupyter notebook

[英]ModuleNotFoundError: No module named 'tensorflow.contrib' with jupyter notebook

So this is my error [ModuleNotFoundError: No module named 'tensorflow.contrib']所以这是我的错误 [ModuleNotFoundError: No module named 'tensorflow.contrib']

I'm using tensorflow 2.0.0 and python 3.6.9 when i downgrade the tensorflow version of the code doesn't work when i upgrade it the same thing happens .我正在使用 tensorflow 2.0.0 和 python 3.6.9 当我降级代码的 tensorflow 版本时,当我升级它时,同样的事情发生了。 (i am using jupyter notebook) (我正在使用 jupyter 笔记本)

I tried to downgrade tensorflow's version and vice versa .我试图降级 tensorflow 的版本,反之亦然。

This is the part of the code where i have the error这是我有错误的代码部分

Please help i really can't find a solution.请帮助我真的找不到解决方案。

tensorflow.contrib is being removed in version 2.0, you therefore need version <= 1.14 to operate tflearn. tensorflow.contrib 在 2.0 版本中被移除,因此您需要版本 <= 1.14 来操作 tflearn。

In the command line (not the notebook), conda install tensorflow=1.14 (or tensorflow-gpu=1.14 if you want GPU support ; or pip install rather than conda install depending on what you are used to do).在命令行(不是笔记本)中, conda install tensorflow=1.14 (或者 tensorflow-gpu=1.14 如果你想要 GPU 支持;或者 pip install 而不是 conda install 取决于你的习惯)。

tensorflow.contrib is being removed in version 2.0, you therefore need version <= 1.14 to operate tflearn (by the way, this is a TFlearn issue, not a tensorflow one). tensorflow.contrib 在 2.0 版本中被删除,因此您需要版本 <= 1.14 来操作 tflearn(顺便说一下,这是一个 TFlearn 问题,而不是 tensorflow 问题)。

In your case, I would consider moving to tensorflow (instead of tflearn) and using the tf.keras API, which provides the higher-level API tflearn aimed at offering in times when tf.keras was not out yet.在您的情况下,我会考虑迁移到 tensorflow(而不是 tflearn)并使用 tf.keras API,它提供了更高级别的 API tflearn,旨在在 tf.keras 尚未推出时提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflow&gt; ModuleNotFoundError:没有名为&#39;tensorflow.contrib&#39;的模块 - Tensorflow > ModuleNotFoundError: No module named 'tensorflow.contrib' ModuleNotFoundError:没有名为“tensorflow.contrib”的模块错误 - ModuleNotFoundError: No module named 'tensorflow.contrib' Error 错误:ModuleNotFoundError:没有名为“tensorflow.contrib”的模块 - Error: ModuleNotFoundError: No module named 'tensorflow.contrib' ModuleNotFoundError:没有名为“tensorflow.contrib”的模块,tensorflow=2.0.0 - ModuleNotFoundError: No module named 'tensorflow.contrib' with tensorflow=2.0.0 ModuleNotFoundError:没有名为“ tensorflow.contrib”的模块; &#39;tensorflow&#39;不是包 - ModuleNotFoundError: No module named 'tensorflow.contrib'; 'tensorflow' is not a package 我发现 ModuleNotFoundError: No module named &#39;tensorflow.contrib&#39; - I found ModuleNotFoundError: No module named 'tensorflow.contrib' 如何修复:“ModuleNotFoundError: No module named 'tensorflow.contrib'” - How to fix: “ModuleNotFoundError: No module named 'tensorflow.contrib'” ModuleNotFoundError:制作聊天机器人时没有名为“tensorflow.contrib”的模块 - ModuleNotFoundError: No module named 'tensorflow.contrib' while making chatbot 没有名为“tensorflow.contrib”的模块 - No module named 'tensorflow.contrib' 没有名为 tensorflow.contrib 的模块 - no module named tensorflow.contrib
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM