First up, Python 2 is dead dead dead. Long live Python 3. Here are some steps to perform:

Update alternatives for Python

update-alternatives --remove python /usr/bin/python2
update-alternatives --install /usr/bin/python python /usr/bin/python3 10

Edit ~/.bashrc to include an alias to python3

nano ~/.bashrc
alias python=python3

Install the python-is-python3 application

sudo apt install python-is-python3
We use cookies only for WordPress functionality, and do not use third-party analytics or tracking.