What does "SyntaxError: Missing parentheses in call to 'print'" mean in Python?

ncoghlan picture ncoghlan · Aug 22, 2014 · Viewed 779.9k times · Source

When I try to use a print statement in Python, it gives me this error:

>>> print "Hello, World!"
  File "<stdin>", line 1
    print "Hello, World!"
                        ^
SyntaxError: Missing parentheses in call to 'print'

What does that mean?

Answer

ncoghlan picture ncoghlan · Aug 22, 2014

This error message means that you are attempting to use Python 3 to follow an example or run a program that uses the Python 2 print statement:

print "Hello, World!"