简体   繁体   中英

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

So this is my error [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 . (i am using jupyter notebook)

I tried to downgrade tensorflow's version and vice versa .

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.

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).

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).

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.

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