How do I change python version in terminal?

How do I change python version in terminal?
Answer
I have followed the below steps in Macbook.
  1. Open terminal.
  2. type nano ~/.bash_profile and enter.
  3. Now add the line alias python=python3.
  4. Press CTRL + o to save it.
  5. It will prompt for file name Just hit enter and then press CTRL + x.
  6. Now check python version by using the command : python –version.
 

Tìm kiếm

Back
Top