1. upgrade :
Reference resources :https://blog.csdn.net/qq_32216809/article/details/86347926
Ubuntu The built-in version is python2.7 and 3.5
Enter the command
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
adjustment Python3 The priority of the , bring 3.6 High priority
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150