Error installing TFLearn pip

I tried installing tflearn via pip as follows

pip install tflearn

and now when I open python, the following happens:

>>> import tflearn Traceback (most recent call last): File "<stdin>", line 1, in <module> File "//anaconda/lib/python2.7/site-packages/tflearn/__init__.py", line 22, in <module> from . import activations File "//anaconda/lib/python2.7/site-packages/tflearn/activations.py", line 7, in <module> from . import initializations File "//anaconda/lib/python2.7/site-packages/tflearn/initializations.py", line 5, in <module> from tensorflow.contrib.layers.python.layers.initializers import \ ImportError: cannot import name variance_scaling_initializer

Any ideas? I am using anaconda python installation.

+4
source share
3 answers

Function variance_scaling_initializer()has been added on April 19 , which means that it was not included in the version of 0.8.0rc0, and you need to go to the new version TensorFlow. If you upgrade version 0.9.0rc0 released this week, tflearn should work.

+3
source

tflearn TensorFlow (, mrry , "variance_scaling_initializer()", TensorFlow 0.9). , TFLearn, TensorFlow 0.7.

0

This is because your version of TensorFlow is too low. Tflearn requires tensorflow> = 1.0, so you need to install the tensor flow again and reinstall the step as follows:

For python2.7:
sudo pip install tensorflow==1.0   #cpu version
sudo pip install tensorflow-gpu==1.0 # gpu version

For python3:
sudo pip3 install tensorflow==1.0   #cpu version
sudo pip3 install tensorflow-gpu==1.0 # gpu version
0
source

All Articles