How to Upgrade Python To Python3 in CentOS ?
Procedure
Kindly follow the below procedure to Upgrade to python 3.5.
1. Login to the SSH :
Download the putty software from “http://www.putty.org/” and install it in your system.
2. After installing it, Launch putty and enter the below details.
Host name (or IP address) : Give the server IP
Port : Give the port number
Click on open
3. After that it asks to enter the username.
login as:
Give as “root”
then copy the root password and go to the putty, in password field if you click the right button of the mouse and press enter, the password will be placed and logged in to shell as root user.
4. Then you can goto the tmp direcotory by using the command
cd /tmp
5. Steps To Upgrade 3.5:
[ Have to put the following commands one by one ]
yum install yum-utils
yum-builddep python
cd /usr/local/src/asm
mkdir software
cd software
curl -O https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar xf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make
make install
To check python version please use ,
python3 –version
[ alias python=’/usr/local/bin/python3.5′ ]
6. library files installation
pip install pyenchant
pip install pyenchant
yum install enchant
pip install mysql-python
pip install ez_setup
pip install unroll
pip install -U pip
pip install pyenchant
import enchant
7. Now you can able to use python 3 with all the library files .