Python 3.6 is not avaliable via apt-get
using a trusted source for the
WSL's current version of Ubuntu (v16.04). Therefore, it is recommended to
install Python 3.6 from source using the steps below. Be warned,
installing Python from source takes several minutes to complete.
sudo apt-get install -y build-essential checkinstall
sudo apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
sudo tar xzf Python-3.6.2.tgz
cd Python-3.6.2
sudo ./configure
sudo make altinstall
cd ~
sudo ln -sf /usr/local/bin/python3.6 /usr/bin/python
python -m pip install --upgrade pip
sudo rm -rf /usr/src/Python*
python --version
python -m pip --version