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

No TensorFlow for Python 2.7 #2

Open
SoftAvocado opened this issue Apr 5, 2021 · 1 comment
Open

No TensorFlow for Python 2.7 #2

SoftAvocado opened this issue Apr 5, 2021 · 1 comment

Comments

@SoftAvocado
Copy link

It seems Tensorflow doesn't support Python 2.7 anymore. I installed some of the versions (1.10.0, 1.5.0, 1.8.0) with .whl from here https://github.com/fo40225/tensorflow-windows-wheel. But with all versions im having this error:

C:\test\slitherin>python slitherin.py --help
pygame 2.0.1 (SDL 2.0.14, Python 2.7.17)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "slitherin.py", line 11, in
from game.models.domain_specific.dnn_ai_solver import DNNSolver, DNNTrainer
File "C:\test\slitherin\game\models\domain_specific\dnn_ai_solver.py", line 7, in
from tf_models.dnn_model import DeepNeuralNetModel
File "C:\test\slitherin\tf_models\dnn_model.py", line 2, in
import tflearn
File "C:\Users\kotich\AppData\Local\Programs\Python\Python27\lib\site-packages\tflearn_init_.py", line 4, in
import tensorflow.compat.v1 as tf
ImportError: No module named v1

Any suggestions on what's wrong and how i can launch your code?

@JacobLiu001
Copy link

JacobLiu001 commented Jul 5, 2021

This is caused by tflearn updating to drop support for TF1.
Consider Downgrading to tflearn==0.3.2
Also, you need to downgrade Keras to 2.2.5, as newer Keras versions started dropping support for TF1.

EDIT: More Detailed instructions:
you can do
pip uninstall package-name
then run
pip install package-name==desired-version (e.g. pip install tflearn==0.3.2)
(or just get requirements.txt from my fork and running pip install -r requirements.txt again)

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

2 participants