CentOS install Python 3.6

surroundings###

  1. CentOS7.5

Start###

  1. Prepare a CentOS

  1. Download the Python source code package from the official website and drag it to the server using the tool Xftp

  1. Install Python dependency packages in centos
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
  1. Unzip Python (/opt/Python-3.6.4.tgz is the storage path of the Python source code package)
tar -xzvf /opt/Python-3.6.4.tgz -C /usr/local/src/
  1. Enter the unzipped directory
cd /usr/local/src/Python-3.6.4./configure --prefix=/usr/local/python3
  1. Install Python
make && make install
  1. Permanently add environment variables
    Enter /etc/profile.d/ to create a new python3.sh file, and add export PATH="$PATH:/usr/local/python3/bin" to the python3.sh file
cd /etc/profile.d/
vi python3.sh
export PATH="$PATH:/usr/local/python3/bin"
  1. Overload environment variables
source ../profile
  1. test
pytohn3 

Recommended Posts

CentOS install Python 3.6
Centos7 install Python2.7
Centos install Python3
CentOS6.8 install python2.7
CentOS + Python3.6+
1.5 Install Centos7
Centos 7.5 python3.6
CentOS7 install python3 and pip3
CentOS 6.9 compile and install python
Centos6 install python3 pip3 ipython3
CentOS 6 compile and install python 3
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
CentOS7 install MySQL
ubuntu18.04 install python2
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS7 upgrade python3
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
ubuntu12.04 install python3
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Python - centos6 installation
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS quickly install Python3 and pip3
How to install Python 3.8 on CentOS 8
CentOS install PHP
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
How to install Python on CentOS 8
Install Python3 and ansible under CentOS8
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS install PostgreSQL 9.1
CentOS7 install mysql8
CentOS 7 install Java 1.8
CentOS8 install fastdfs6.06
CentOS 7 install Gitlab
Centos 7 install PostgreSQL
CentOS7 install MySQL8
CentOS 7 install Java 1.8