This is based on Method 2 in https://websiteforstudents.com/installing-the-latest-python-3-7-on-ubuntu-16-04-18-04/
First, you need to install Python 3.7 (you will currently have Python 3.5.2):
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update