Install Python 3.5.6 on CentOS/RHEL 7/6
Python 3.5.6 is a new version of the language, which is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. You can also know more features in python 3.5.6
Install Python
See Also:
- HOW TO INSTALL PYTHON 3.5.6 ON UBUNTU
- HOW TO INSTALL PYTHON 3.6.0 ON UBUNTU USING PPA
- HOW TO INSTALL PYTHON 3.6.0 ON UBUNTU
- INSTALL PYTHON 3.5.1 ON CENTOS/RHEL 7/6
Step #1 Require Package
Firstly make sure that all require packages installed on your system. Use following command to install all packages:
# yum install gcc openssl-devel bzip2-devel
Step #2 Download Python 3.5.6
Download Python using following command and you can also download latest version from python official site.
# cd /opt # wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz
Step #3 Extract Archive and Compile
Use below commands to extract Python source code and compile it on your system using altinstall.
# tar xzf Python-3.5.6.tgz
# cd Python-3.5.6
# ./configure
# make
# make install
If you want to used to prevent replacing the default python binary file /
# tar xzf Python-3.5.6.tgz
# cd Python-3.5.6
# ./configure
# make altinstall
Step #4 Check the Python Version
Check the latest version installed of python using below command
# python3.5 -V Or # python3.5 --version
Python 3.5.6
Reference:
Enjoy it!