0

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?

  • possibly answered here: https://stackoverflow.com/questions/18425379/how-to-set-pythons-default-version-to-3-3-on-os-x – Bajal Jun 02 '18 at 15:27
  • oh yeah, that's what I thought the reason could possibly be, the default alias of mac stuff about python, thank you! – Juan Guang Jun 02 '18 at 17:16

1 Answers1

1

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.

Davit Tovmasyan
  • 3,238
  • 2
  • 20
  • 36