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

When I run python board.py #9

Open
agan112 opened this issue Mar 9, 2017 · 3 comments
Open

When I run python board.py #9

agan112 opened this issue Mar 9, 2017 · 3 comments

Comments

@agan112
Copy link

agan112 commented Mar 9, 2017

File "board.py", line 74
print "Iteration:", '%04d' % (iteration + 1), "cost=", "{:.9f}".format(avg_cost)
^
SyntaxError: invalid syntax

@skandix
Copy link

skandix commented Mar 12, 2017

seems like you are using python3.. this error is due to the lack of parentheses around the print statement..
it should look something like this

print ("Iteration:", '%04d' % (iteration + 1), "cost=", "{:.9f}".format(avg_cost))

@SheldonGeek
Copy link

I had the same issue. This is caused by python version 3. The project needs python 2 to run. So I setup a conda virtual environment with python 2.7 and tensorFlow for python 2.7 to fix this issue. After you fix this, you will have multiple other issues such as TypeError: only integer scalar arrays can be converted to a scalar index. I will comment on another post about how I fixed it.

@BenjaminFunklin
Copy link

https://stackoverflow.com/questions/24405561/how-to-install-2-anacondas-python-2-7-and-3-4-on-mac-os-10-9

This should help out with that issue adding to what SheldonGeek said

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