yenchenlin / DeepLearningFlappyBird

Flappy Bird hack using Deep Reinforcement Learning (Deep Q-learning).
MIT License
6.62k stars 2.04k forks source link

AttributeError #77

Open Setembru opened 3 years ago

Setembru commented 3 years ago

After py deep_q_network.py:

AttributeError: module 'tensorflow' has no attribute 'InteractiveSession'

Then pip install --upgrade tensorflow==0.7

It returns:

ERROR: Could not find a version that satisfies the requirement tensorflow==0.7 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0)

ERROR: No matching distribution found for tensorflow==0.7

How can I run this?

sparkingdark commented 3 years ago

Hey @Setembru I think as it's a very old repository does not update regularly. so try with tensorflow>=0.7

drprajapati commented 2 years ago

Add this two lines. It resolved the issue.

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()