Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (19.9k points)

A very basic question.

I am trying to install tensorflow library in Anaconda python(spyder).

import tf.contrib.keras.preprocessing

Its is giving me error as "No module found". I also tried import tensorflow.contrib.keras.preprocessing

I also tried from tf.contrib.keras.preprocessing.text import Tokenizer.

This also doesn't work

Is there anything i miss out, Please correct me.

1 Answer

0 votes
by (25.1k points)
edited by

It is because you are using tf, you need to alias as tensorflow:

import tensorflow as tf

So, you can try this:

from tensorflow.contrib.keras.preprocessing.text import Tokenizer

Here's a video to help you learn more about tensorflow: 

Related questions

Browse Categories

...