Install Python3.7 on Ubuntu

Overview##

In some cases, such as installing a cool tool, Python 3.6+ is required. At this time, you can choose to download the source code from Python official website and then compile it. However, compilation errors may occur due to various problems. For me who just want to install a higher version of Python to use Cool's tools,
Solving these compilation problems step by step from the beginning is not what I want, so is there a way to install Python directly with apt install? The answer is Yes, detailed below (that is, three commands).

In order to use add-apt-repository, you need to install the following packages first:

sudo apt-get install software-properties-common

On Ubuntu's Package Management Website, there is a special PPA that maintains binary packages from Python2.3 to Python3.8. You can directly add the PPA source and install Python:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.7

If you want to install another version of Python, change the above 3.7 to the corresponding version number:

sudo apt install -y python3.6

After installing the corresponding version, you can use it with Pipenv to realize multi-version Python management and package installation.

reference##

  1. https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
  2. https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

Recommended Posts

Install Python3 on Ubuntu 14.04
Install Python3 on Ubuntu 16.04
Install Python3.7 on Ubuntu
Install Python 3.7 on Ubuntu 18.04 LTS
ubuntu18.04 install python2
ubuntu12.04 install python3
ubuntu18.04 install python
How to install Python 3.8 on Ubuntu 18.04
Install Python virtual environment on Ubuntu 18.04
Install TensorFlow (python2.7 version) on Ubuntu
install vscode on ubuntu18
Install Redis on Ubuntu
Install R4 on ubuntu20
Install postgresql-10 on Ubuntu 18.04
Install python3.6 under Ubuntu 16.04
Install docker on Ubuntu
Install Docker on ubuntu18.04
Install nodejs10 on Ubuntu16
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install JDK10+ on Ubuntu
Install python in Ubuntu
Install KDE on Ubuntu16.04.2
Install flashplayer on Ubuntu
Install the latest Python 3.6 version on Ubuntu
How to install Python2 on Ubuntu20.04 ubuntu/focal64
Docker practice (1): install Docker on Ubuntu 16.04
Install ubuntu on virtual machine
Install OpenSSL 1.0.2 on Ubuntu Server 14.04
Ubuntu install the latest Python 3.
ubuntu18.04 compile and install python3.8
Install Android Studio on Ubuntu
Install python3 on linux, keep python2
Install scrapy framework on ubuntu
Install Mysql offline on Ubuntu
Install Oracle Java8 on Ubuntu
[Practice] How to install python3.6 on Ubuntu system
Install Go locale on Ubuntu16
Install common software on Ubuntu 16.04
Install non-portable QQ on ubuntu
Install Docker on Ubuntu 18.04 offline
How to install Memcached on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
Install Tenda u12 driver on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
Install Chef server workstation on Ubuntu 18.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
Install botan2 encryption library on ubuntu
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04