Trampling record of Python 3.5 upgraded to 3.6 under ubuntu16.04


1. Sudo apt get update reports an error when Python 3.5 is upgraded to 3.6

The steps to install Python 3.6 are as follows:

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6

But in the403 Forbidden encountered during sudo apt get update
There are two solutions:
(1) Remove damaged and old PPA warehouse

sudo add-apt-repository --remove ppa:jonathonf/python-3.6

(2) This is from a Japanese blog

sudo add-apt-repository ppa:deadsnakes/ppa 

There must be one of the two methods!!!

2. The terminal cannot be opened after upgrading to 3.6

Execute the following command:

cd /usr/lib/python3/dist-packages/gi/
sudo cp
sudo cp

3. Do not uninstall the python version of Ubuntu 16.04, including Python 2.7 and python 3.5!!!!!!!!!!!!

4. Problems caused by switching the default Python 3 version from 3.5 to 3.6

Trampling record of Python 3.5 upgraded to 3.6 under ubuntu16.04
The red circle shows that an error occurred while checking for updates, which is caused by switching the version of Python 3. Just switch the version of Python 3 back to Python 3.5
To view the path to Python 3:

which python3

It is shown as:


Open path:

cd /usr/bin/

To delete a soft connection:

sudo rm python3

New soft connection:

sudo ln -s python3.5 python3

To view the python 3 version:

python3 --version

It was printed out as Python 3.5.2
Reset computer

5. Summary

Python 3.6 can be installed, but the default version of Python 3 should be kept at 3.5, otherwise it is easy for the Ubuntu system to crash!!!!!!!!!!