Detailed tutorial on installing python3.7 for ubuntu18

Reference article
ubuntu source code install python3
linux compile and install python3.6 tutorial details

Ready to work

Installation tool

sudo apt update
sudo apt upgrade
sudo apt install gcc
sudo apt install g++
sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Officially begin

Download python file

sudo curl -O https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz

Unzip the source package

sudo tar Jxvf Python-3.7.1.tar.xz

Create python installation path

sudo mkdir /usr/python37

Install python

sudo ./configure --enable-optimizations --prefix=/usr/python37
sudo make && make install

Add environment variables

sudo vim /etc/profile

Add at the end

export PATH=$PATH:/usr/python37/bin
alias python="python3.7"
alias pip="pip3.7"

Add user alias

vim ~/.bashrc

Add at the end

alias python="python3.7"
alias pip="pip3.7"

Create soft connection

sudo ln -s /usr/python37/bin/python3.7/bin/python
sudo ln -s /usr/python37/bin/pip3.7/bin/pip

Replace domestic source

cd ~
mkdir .pip
cd .pip
 pip.conf
vim pip.conf

Add the following content

[ global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

Update pip

sudo pip install --upgrade pip

to sum up

This is the end of this article on the detailed tutorial of installing python3.7 for ubuntu18. For more related ubuntu18 installation of python3.7 content, please search for the previous articles of ZaLou.Cn or continue to browse the related articles below. Hope you all Support ZaLou.Cn!

Recommended Posts

Detailed tutorial on installing python3.7 for ubuntu18
Detailed tutorial for installing CUDA9.0 on Ubuntu 16.04
Detailed tutorial for installing phpMyAdmin on Ubuntu 18.04
Detailed steps for installing Django under Python 3.6 in Ubuntu 16.04 environment
Error when installing Python module on Ubuntu
Detailed tutorial on installing MySQL 8 in CentOS 7
Graphical tutorial for installing Pycharm 2020.1 in Ubuntu 20.04
Install Python3 on Ubuntu 14.04
Install Python3 on Ubuntu 16.04
Install Python3.7 on Ubuntu
Detailed tutorial of installing nginx on centos8 (graphic)
Install Python 3.7 on Ubuntu 18.04 LTS
Detailed tutorial on installing JDK8 on Linux system (CentOS7 installation)
Python embeds C/C++ for detailed development
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 the latest Python 3.6 version on Ubuntu
Tutorial diagram for installing zabbix2.4 under centos6.5
Graphical tutorial for installing JDK1.8 under CentOS7.4
How to install Python2 on Ubuntu20.04 ubuntu/focal64
Deploy python3 and nginx projects on ubuntu18.04
Small tutorial: List the disks on Ubuntu
Use python3 to install third on ubuntu
Windows10 install ubuntu20.04 dual system detailed graphic tutorial
Ubuntu16 upgrade Python3
ubuntu18.04 install python2
Relearn ubuntu --python3
Python2.7 [Installation Tutorial]
Ubuntu operation tutorial
Solve the problem of installing VMwareTools on Ubuntu 18.04
Detailed steps to install Anaconda on Linux (Ubuntu 18.04)
CentOS8 detailed tutorial for configuring local yum source
ubuntu12.04 install python3
Python3 development environment to build a detailed tutorial
Errors and solutions for installing remix-ide on CentOS
Detailed steps to install Anaconda on Linux (Ubuntu 18.04)
How to play happily with Python3 on Ubuntu
lamp on ubuntu
[Practice] How to install python3.6 on Ubuntu system
Configure automatic updates for Ubuntu Server on Azure
14. MysSQL for Python3
Detailed explanation of data types based on Python
Things to do after installing Ubuntu 20.04 (xiaobai tutorial)
The latest method of installing Mongodb on Ubuntu 16.04
ubuntu18.04 install python
Solve the problem of installing Theano on Ubuntu19
ubuntu16.04 upgrade python2
The tutorial for upgrading from Centos7 to Centos8 (detailed graphic)
A simple tutorial to install Sogou Pinyin on ubuntu18.04
Detailed explanation of common tools for Python process control
The pits encountered when installing yii2 advanced on Ubuntu
Detailed steps to install Sogou input method on Ubuntu 20.04
Detailed explanation of the remaining problem based on python (%)
Tutorial for setting up FTP server in Ubuntu 16.04 environment
Ubuntu18.04 switch Python version
Manual for Ubuntu Installation
install vscode on ubuntu18
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04