-4

On my MAC, in terminal/command line when I type:
python --version

I get:

Python 2.7.10

but when on my PyCharm I type:

import sys 
print (sys.version) 

I get:

Python 3.7.1.

Why it's not the same? What are the steps to fix it on a MAC?

I've tried the commands below, but it doesn't work:

sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7.1

Then:

python --version

I still get:

Python 2.7.10

1 Answers1

0

This answer should help you: https://stackoverflow.com/a/18425592/1289629

In pycharm, I believe, in preferences you've (or by default) the latest version of Python is set.

Setting up the alias should help you.

Vighnesh Pai
  • 1,795
  • 1
  • 14
  • 38