Are you absolutely sure you're using Python 3, and not accidentally invoking Python 2?
~ $ python3
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello', end='')
hello>>>
~ $ python2
Python 2.7.13 (default, Jul 18 2017, 09:17:00)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello', end='')
File "<stdin>", line 1
print('hello', end='')
^
SyntaxError: invalid syntax
>>>
import sys; print(sys.version)and see what it prints out. Post back with the results.import sys; print(sys.version)give you?print(sys.version)works for both function and statementprint. It won’t work in python3 if some other function has been assigned to the nameprint, but that also wouldn’t generate this particular error.