Installation Python3.7.0 the CentOS offline

1. Download python installation package and its dependencies

python installation package: the Python-3.7.0

download link:www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz

Dependent on the installation package

zlib-devel     krb5-devel         ibselinux-devel

bzip2-devel    openssl-devel    ncurses-devel    

sqlite-devel       readline-devel     tk-devel      

gdbm-devel         db4-devel        libpcap-devel     xz-devel     

Download: http://rpmfind.net/linux/rpm2html/search.php?query=xz-devel&submit=Search+...&system=&arch=

2. Upload these installation package to any directory

3. Extract installation package python

takes -xvJf Python 3.7 . 0 . takes .xz

4. compile and install

mkdir / usr / local / python3 # compiler to create the installation directory 
cd Python - 3.7 . 0      # python into the unpacked directory 
. / the configure --prefix = / usr / local / python3
 the make && the make  install   # compiler $ installation

5. Create a soft link

ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3

6. Verify that the installation was successful

python3 - V 
pip3 -V

 

Guess you like

Origin www.cnblogs.com/chuijingjing/p/10948260.html