How to Solve NameError: name 'print_function' is not defined -- _future_
Solution: Import the 'print_function' module
To Solve the error, add the following line to the top of your code.
from _future_ import print_function
For more information:
Python _future_ print_function