Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tensorflow.compat.v1 Error #11

Open
yogidosalwar opened this issue Feb 5, 2021 · 4 comments
Open

tensorflow.compat.v1 Error #11

yogidosalwar opened this issue Feb 5, 2021 · 4 comments

Comments

@yogidosalwar
Copy link

yogidosalwar commented Feb 5, 2021

HI @omidmnezami

I have installed all dependencies as per your requirement, but still getting the error.

while testing python ER_model.py test

File "ER_model.py", line 4, in
import tflearn
File "/home/lib/python2.7/site-packages/tflearn/init.py", line 4, in
import tensorflow.compat.v1 as tf
ImportError: No module named compat.v1

Thank you!!

@omidmnezami
Copy link
Owner

omidmnezami commented Feb 6, 2021

@yogidosalwar

This error is because of the version of your TensorFlow.
Please make sure you install the right version:

pip install tensorflow==1.8.0

You may also check the version by:

import tensorflow as tf
print(tf.__version__)

Thanks

@TorAP
Copy link

TorAP commented Mar 19, 2021

Hello @omidmnezami

I still get this error, even though I have the tensorflow = 1.8.0.

python ER_model.py train

Traceback (most recent call last):
File "ER_model.py", line 4, in
import tflearn
File "/User/opt/anaconda3/envs/py2/lib/python2.7/site-packages/tflearn/init.py", line 4, in
import tensorflow.compat.v1 as tf
ImportError: No module named compat.v1

@omidmnezami
Copy link
Owner

@TorArnthPetersen

This error is because of importing tflearn with an incompatible version of Tensorflow. Please try a version lower that 1.8.0 if it doesn't work. (1.8.0 works fine on my system though.)

@sanxchep
Copy link

@omidmnezami What is your tflearn version?

and if possible can you do a pip freeze for all the packages required to requirement.txt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants