Transferred from: http://www.cnblogs.com/kimyeee/p/7250560.html
1. Environment preparation, installation of Zlib-devel and openssl-devel, etc.
Yum-y Install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel Db4-dev El Libpcap-devel Xz-devel
2. Download and install
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
Mkdir-p/usr/local/python3
TAR-ZXVF python-3.6.1.tgz
./configure--prefix=/usr/local/python3
Make && make install
3. Establishing a soft connection
Ln-s/usr/local/python3/bin/python3/usr/bin/python3
4. Add the PATH environment variable
Vim ~/ . Bash_profile#. bash_profile# Get the aliases and functions if Then ~/. BASHRCfi# User specific environment and startup Programspath= $PATH: $HOME/bin :/usr/local/python3/Binexport PATH
Then ESC, Wq: Exit
SOURCE ~/.bash_profile
5. Testing
Python3-v
6. Install Pip
Environment:
Setuptools
wget--no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5= C607dd118eae682c44ed146367a17e26
TAR-ZXVF setuptools-19.6.tar.gz
CD setuptools-19.6
Python3 setup.py Build
Python3 setup.py Install
Start installation
wget--no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-8.0.2.tar.gz#md5= 3a73c4188f8dbad6a1e6f6d44d117eeb
TAR-ZXVF pip-8.0.2.tar.gz
CD pip-8.0.2
Python3 setup.py Build
Python3 setup.py Install
Test:pip3 Install Paramiko
Linux installation python3.6.1