I have been using Python 2.7 for a while. Suddenly, I am getting errors with the print statement and it looks like I should now use Python 3.x syntax.
print 'hello world'
File "<ipython-input-462-d05d0c8adf1f>", line 1
print 'hello world'
^
SyntaxError: invalid syntax
print('hello world')
hello world
I double checked that I am still running a 2.x Python version:
import sys
print (sys.version)
2.7.12 |Anaconda 2.3.0 (64-bit)| (default, Jun 29 2016, 11:07:13) [MSC v.1500 64 bit (AMD64)]
The only change I did recently to my Python environment was to update matplotlib from 1.4 to 1.5, but being honest I can't say if the problem started from the exact moment of the update.
Any help would be appreciated (please let me know which other info on my system are needed)