Since the system already has 2.6 python, it is best not to modify the system version, using the compiled installation
Download Python3.6.1 Package
wget HTTPS://WWW.PYTHON.ORG/FTP/PYTHON/3.6.1/PYTHON-3.6.1.TAR.XZ
Installation dependencies:
Yum-y Install Readline-devel
Decompression PYTHON-3.6.1.TAR.XZ
xz-d PYTHON-3.6.1.TAR.XZTAR-XVF Python-3.6.1.tar
Compiling the installation, specifying the/usr/local/python361 directory
CD python-3.6.1./configure--prefix=/usr/local/python361make && make install
Create a soft link
[Email protected] bin]# ln-s/usr/local/python361/bin/python3.6/usr/bin/python36
Installation of Ipython, the use of domestic watercress source, fast speed.
Python36-m easy_install-i Http://pypi.douban.com/simple/ipython
Test Ipython
[Email protected] ~]# ipython/usr/local/python361/lib/python3.6/site-packages/ipython-6.1.0-py3.6.egg/ipython/ Core/history.py:226:userwarning:ipython requires SQLite, your history won't be saved warn ("IPython history re Quires SQLite, your history won't be saved ") Python 3.6.1 (default, June 1, 11:21:44) Type ' copyright ', ' credits ' or ' License ' for more Informationipython 6.1.0 – an enhanced Interactive Python. Type '? ' for help. In [1]:
This article is from the "Shei" blog, make sure to keep this source http://kurolz.blog.51cto.com/11433546/1935018
Python Learning notes-compiling and installing Python3.6.1 + IPython