macOS
1 | $ brew install python3 |
Ubuntu
Install ppa
This PPA contains more recent Python versions packaged for Ubuntu. Install ppa by running the following command.
1 | $ sudo add-apt-repository ppa:deadsnakes/ppa |
Update packeges
Now, update your packages by running the following command.
1 | $ sudo apt-get update |
安装Python3.8
1 | $ sudo apt-get install python3.8 |
Add python3.6 & python3.7 to update-alternatives
1 | $ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 |
Update python3 to point to python3.8
1 | $ sudo update-alternatives --config python3 |
Enter 2 for python3.8
Test the version of python
1 | $ python3 -V |