Question: How Do I Make Python 3 Default in Ubuntu?
Contents How Do I Make Python3 Default in Ubuntu? Steps to Set Python3 as Default on Ubuntu? Check Python Version on Terminal – Python –Version. Get Root User...
Contents
How do I make python3 default in Ubuntu?
Steps to Set Python3 as Default On ubuntu?
- Check python version on terminal – python –version.
- Get root user privileges. On terminal type – sudo su.
- Write down the root user password.
- Execute this command to switch to python 3.6. …
- Check python version – python –version.
- All Done!
How do I make python3 my default Python?
To make python3 as default python by replacing python2 in Ubuntu.
- Open Terminal.
- cd.
- nano ~/.bashrc.
- alias python=python3 (Add this line on top of .bashrc file)
- Press ctr+o (To save the file)
- Press Enter.
- Press ctr+x (To exit the file)
- source ~/.bashrc OR . ~/.bashrc (To refresh the bashrc file)