1. Install Python3.6
Installation Preparation
mkdir /usr/local/python3
wget --no-check-certificate https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xzvf Python-3.6.0.tgz cd Python-3.6.0
Compile and install
./configure --prefix=/usr/local/python3
make && make install
The default Python revised to Python3.6, and create a soft link
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/python3/bin/python3 /usr/bin/python
Modification of the original python yum configuration files used
vim /usr/bin/yum
#!/usr/bin/python --> #!/usr/bin/python2.7
vim /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python --> #!/usr/bin/python2.7
2. Install pip3
Installation pip dependent libraries
yum -y install zlib zlib-devel
If you are installing the above dependencies the following error: Delta RPMs disabled because / usr / bin / applydeltarpm not installed.
Please do the following:yum provides '*/applydeltarpm'
reasons, the above problem is the lack of incremental RPM conditions, use the above command flashback specific missing package name , and install it.
Install setuptools
Python package management tool, install additional modules depend on this module support.
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
If Tip: zlib need to install zlib-devel, and re-compile and install Python3.6
Install pip, and create a soft link
wget --no-check-certificate https://github.com/pypa/pip/archive/9.0.1.tar.gz tar -zvxf 9.0.1 -C pip-9.0.1 cd pip-9.0.1 python3 setup.py install ln -s /usr/local/python3/bin/pip /usr/bin/pip3
Upgrade pip
pip3 install --upgrade pip
pip3 install ipython
ln -s /usr/local/python3/bin/ipython /usr/bin/ipython3