Juan Guang
Juan Guang

Reputation: 1

when I type python in my terminal, should I get python2 or python3?

I am using a Mac and have Python 2 and 3 installed. However, I'm getting some inconsistence on the Internet that someone typed "python" and get the version of python3 while I have to type "python3" to get python3 and "python" or "python2" to get python2. I decided to study the Django and I read that the Django will be only supporting python3 but the commands on the official site all starting with "python ..." instead of "python3 ...". Therefore, I am confused how is everyone using python3 with the Django or how exactly does everyone use python3?

Upvotes: 0

Views: 70

Answers (1)

Davit Tovmasyan
Davit Tovmasyan

Reputation: 3588

You are able to setup your bash profile with 3rd version.

$ python --version
Python 2.7.6
$ python3 --version
Python 3.4.3
$ alias python=python3
$ python --version
Python 3.4.3

Place this into ~/.bash_profile file.

Upvotes: 1

Related Questions