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 doesnt work
However I verified this in the tensorflow website, and it is present. The link to the library is https://www.tensorflow.org/api_docs/python/tf/contrib/keras/preprocessing.
I tried to pip and conda install. But that also throwing out error.
From anaconda prompt i typed this:
activate tensorflow
pip install tf.contrib.keras.preprocessing
conda install tf.contrib.keras.preprocessing
Is there anything i miss out, Please correct me.
You are doing it wrong as tf
is not the name of the tensorflow
module but an alias in the tutorials.
import tensorflow as tf
Thus try this:
from tensorflow.contrib.keras.preprocessing.text import Tokenizer
From your comments it seems that the module might not be installed so you can check in the list of installed packages:
conda list
If not present, install it with pip
. Follow the doc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With