python update version code example

Example 1: command to upgrade python version

python -m pip install pip
#or
python -m pip install –upgrade pip
python -m pip install --upgrade pip

Example 2: update python ubuntu

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python3.7

Example 3: update python ubuntu

$ sudo apt update -y
$ sudo apt install python3.7

Example 4: python version

python ––version

Example 5: how to update python

The explanation would be too long for a grepper answer.
So here is a link to a stackoverflow question:

https://stackoverflow.com/questions/45137395/how-do-i-upgrade-the-python-installation-in-windows-10

Example 6: install python3

echo This is for linux. (debian/unbuntu)
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
curl -O https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -xf Python-3.7.4.tar.xz
cd Python-3.7.4
./configure --enable-optimizations
make
sudo make altinstall
python3.7 --version
cd ../