Today I ran into the trouble as most of my scripts were failing due to version mis match. The code I had written was Python 3.x compatible but my system had by default set Python2.x as the default version. Following are the steps which i followed to fix the problem:
- Open ITerm. ( You can use your default mac terminal also.)
- Open your
~/.bash_profilein vim or any other text editor.
- Save the file
- Now try running
python -versionto see which version is coming up
Let me know in comments if you fail to follow above steps.