简体   繁体   English

ModuleNotFoundError:没有名为“tensorflow.contrib”的模块错误

[英]ModuleNotFoundError: No module named 'tensorflow.contrib' Error

I am getting such an error in the keras codes,wrote in pycharm.Tried the solutions on the internet but I couldn't find a solution.我在 keras 代码中遇到这样的错误,写在 pycharm 中。在互联网上尝试了解决方案,但我找不到解决方案。 Do you have any suggestions?你有什么建议吗?

Error Image错误图像

Pip List Pip列表

Please install the tensorflow and pillow using pip install tensorflow and pip install pillow then do a little changes as below while importing libraries to fix this error:请使用pip install tensorflowpip install pillow

import numpy as np
from PIL import Image

from tensorflow import keras
from tensorflow.keras.applications import resnet50
from tensorflow.keras.preprocessing import image

Note: Please mention the error code in your question not in the form of a screenshot which will be easy to replicate the issue.注意:请在您的问题中提及错误代码,而不是以屏幕截图的形式,这样很容易复制问题。

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

相关问题 错误:ModuleNotFoundError:没有名为“tensorflow.contrib”的模块 - Error: ModuleNotFoundError: No module named 'tensorflow.contrib' Tensorflow> ModuleNotFoundError:没有名为'tensorflow.contrib'的模块 - Tensorflow > 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”的模块; 'tensorflow'不是包 - ModuleNotFoundError: No module named 'tensorflow.contrib'; 'tensorflow' is not a package ModuleNotFoundError:没有名为“tensorflow.contrib”的模块与 jupyter notebook - ModuleNotFoundError: No module named 'tensorflow.contrib' with jupyter notebook 我发现 ModuleNotFoundError: No module named 'tensorflow.contrib' - 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