iMatrix
iMatrix

Reputation: 97

“ImportError: No module named core_rnn” When I use tensorflow and use the tflearn?

the program can be downloaded from:

The error:

Traceback (most recent call last): File "/home/imatrix/download/ chrisruk/cnn-master/train_cnn.py", line 7, in import tflearn

File "/usr/local/lib/python2.7/dist-packages/tflearn/init.py", line 21, in from .layers import normalization File "/usr/local/lib/python2.7/dist-packages/tflearn/layers/init.py", line 10, in from .recurrent import lstm, gru, simple_rnn, bidirectional_rnn, \ File "/usr/local/lib/python2.7/dist-packages/tflearn/layers/recurrent.py", line 8, in ImportError: No module named core_rnn

Upvotes: 0

Views: 3283

Answers (2)

Temak
Temak

Reputation: 3009

Most probably the error is because of incompatible versions of tflearn and tensorflow. (Probably you have updated tflearn, but didn't update tensorflow).

Try remove tensorflow and tflearn packages and install the latest version:

pip uninstall tflearn 
pip uninstall tensorflow
pip install -I tensorflow
pip install -I tflearn

Or if you don't want to use tensorflow v1.0 then install older versions of both packages:

pip uninstall tflearn 
pip uninstall tensorflow
pip install -I tensorflow==0.12.1
pip install -I tflearn==0.2.1

Upvotes: 0

SerialDev
SerialDev

Reputation: 2847

Assuming Tf 0.12 onwards these have been moved to:

tf.contrib.rnn [followed by whichever core_rnn. you need ]

Upvotes: 1

Related Questions