punctuator2 icon indicating copy to clipboard operation
punctuator2 copied to clipboard

Problem with data.py

Open gloriagennaro opened this issue 6 years ago • 4 comments

Trying to run the code in data.py from my OS terminal I get this error message:

File "data.py", line 80 print "Vocabulary size: %d" % len(vocabulary) ^ SyntaxError: invalid syntax

Can you explain to me how to overcome this?

gloriagennaro avatar Jun 17 '18 09:06 gloriagennaro

What is the version of your python?

studiawan avatar Jun 24 '18 00:06 studiawan

You need to use the Python version 2.7 for this particular script.

acerock6 avatar Aug 04 '18 07:08 acerock6

You could use the pre-installed python2 to python3 converter within python3.

shavakagrawal avatar Aug 24 '18 09:08 shavakagrawal

yes you can use <2to3 data.py>

ksharm50 avatar Aug 24 '18 13:08 ksharm50