简体   繁体   中英

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. Do you have any suggestions?

Error Image

Pip List

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM