CentOS6.5 Detailed steps to install python3.7

  • 2021-06-28 09:52:17
  • OfStack

1. Download python3


wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz

2. Decompression


[root@mycentos ~]# tar -xzvf Python-3.7.0.tgz

Build a compilation directory first:


[root@mycentos ~]# mkdir /usr/local/python3

Version Python 3.7 requires a new package, libffi-devel, which can be compiled and installed again after installation.


[root@mycentos ~]# yum install -y libffi-devel

Then compile, install:


[root@mycentos ~]# cd Python-3.7.0
[root@mycentos ~]# ./configure --prefix=/usr/local/python3
[root@mycentos ~]# make
[root@mycentos ~]# make install

Create soft links:


[root@mycentos ~]# ln -s /usr/local/python3/bin/python3 /usr/bin/python3

View Version:


[root@mycentos ~]# python3 -V

Python 3.7.0

Installation over!

These are all the points of knowledge and detailed steps in this introduction. Thank you for your support on this site.


Related articles: