Python 3.5.2 / Release Date: 2016-06-27

https://www.python.org/downloads/release/python-352/


How To Install Python 3 on CentOS 7

http://idroot.net/tutorials/how-to-install-python-3-on-centos-7/




[root@centos7 ~]#
[root@centos7 ~]# python -V
Python 2.7.5
[root@centos7 ~]#
[root@centos7 ~]# yum update
[root@centos7 ~]#
[root@centos7 ~]# yum list installed
[root@centos7 ~]# yum groupinstall "Development tools"
[root@centos7 ~]# wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
-bash: wget: command not found
[root@centos7 ~]# yum install wget
[root@centos7 ~]# wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
[root@centos7 ~]# ls
Python-3.5.2.tgz  
[root@centos7 ~]#
[root@centos7 ~]# mkdir download
[root@centos7 ~]# mv ./Python-3.5.2.tgz  ./download/
[root@centos7 ~]# cd download/
[root@centos7 download]# ls
Python-3.5.2.tgz
[root@centos7 download]# tar xzf Python-3.5.2.tgz
[root@centos7 download]# cd Python-3.5.2
[root@centos7 Python-3.5.2]# ls
Doc      Mac              PC        README        configure
Grammar  Makefile.pre.in  PCbuild   Tools         configure.ac
Include  Misc             Parser    aclocal.m4    install-sh
LICENSE  Modules          Programs  config.guess  pyconfig.h.in
Lib      Objects          Python    config.sub    setup.py
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]# ./configure --prefix=/usr/local/
creating Makefile
[root@centos7 Python-3.5.2]# make altinstall
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]# python
Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]# python3.5
Python 3.5.2 (default, Dec 29 2016, 01:32:05)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
[root@centos7 Python-3.5.2]#
[root@centos7 Python-3.5.2]# which python
/usr/bin/python
[root@centos7 Python-3.5.2]# whereis python
python: /usr/bin/python2.7 /usr/bin/python /usr/lib/python2.7 /usr/lib64/python2.7 /etc/python /usr/local/bin/python3.5m /usr/local/bin/python3.5 /usr/local/bin/python3.5m-config /usr/local/lib/python3.5 /usr/include/python2.7 /usr/share/man/man1/python.1.gz

[root@centos7 install]# python -V
Python 2.7.5

[root@centos7 install]# python3.5 -V
Python 3.5.2


[root@centos7 install]# su kite
[kite@centos7 install]$ cd
[kite@centos7 ~]$ ls
[kite@centos7 ~]$ ll
total 0
[kite@centos7 ~]$
[kite@centos7 ~]$ pwd
/home/kite
[kite@centos7 ~]$
[kite@centos7 ~]$ python
Python 2.7.5 (default, Nov  6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
[kite@centos7 ~]$ python3.5 -V
Python 3.5.2
[kite@centos7 ~]$ python -V
Python 2.7.5
[kite@centos7 ~]$
[kite@centos7 ~]$ alias python=python3.5
[kite@centos7 ~]$
[kite@centos7 ~]$ python -V
Python 3.5.2
[kite@centos7 ~]$

Posted by cheeky_kite
,