How to install python 3.7 in ubuntu Linux guru

How to install python 3.7 in ubuntu.

Python is a most populer programing language in the world, Also python is a fastes growing progaming language. Python is very versatile language so you can easily learn and understand python.

The latest version of python is 3.7. In ubuntu 18.04 python version 2 and 3.6 are pre installed.
apt update
apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
Enter to continue.
sudo apt install python3.7
Check the python version.
python3.7 --version

how to set python3 as default in ubuntu.

A simple way to set latest python version in ubutu is to set it in .bashrc file as if alias, Create an alias of latest python version and put it in .bashrc.
open .bashrc and set create an alias for python.
alias python=python3.7
save the file and restart the terminal.
You you can check with python command, it will show latest version of python.
❯ python --version
Python 3.7.4

Linux Guru

Welcome to my Linux blog! Hello Friends, I am Vishal Vyas. I am a DevOps engineer and expert in Linux and Cloud Computing. Also I am a Certified Kubernetes Administrator, I have a total 12 plus years of experience in the IT field and I have worked in various technologies. I write about Linux, AWS, DevOps and web Technologies, I have started this blog to share my technical knowledge with all, I am posting here what I learn from the latest web technologies and the likes.

Post a Comment

Previous Post Next Post