1# Remove python2
2sudo apt purge -y python2.7-minimal
3
4# You already have Python3 but
5# don't care about the version
6sudo ln -s /usr/bin/python3 /usr/bin/python
7
8# Same for pip
9sudo apt install -y python3-pip
10sudo ln -s /usr/bin/pip3 /usr/bin/pip
11
12# Confirm the new version of Python: 3
13python --version