How to install python2.7 with pip2.7

Python is one of the most famous and powerful languages used so in order to install or update it to 2.7 version following steps can be used.

Installing the Python2.7.
[root@ip-10-0-1-55 ~]# yum install python27 python27-devel
[root@ip-10-0-1-55 ~]# python --version
Python 2.7.10

If its still showing older version add the new version as default.
[root@ip-10-0-1-55 ~]# alternatives --config python

There are 2 programs which provide 'python'.
 + 1           /usr/bin/python2.6
*  2           /usr/bin/python2.7

Enter to keep the current selection[+], or type selection number: 2
[root@ip-10-0-1-55 ~]# python --version
Python 2.7.10

Installing the pip2.7.
[root@ip-10-0-1-55 ~]# wget
--2016-05-26 11:10:33--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1524722 (1.5M) [text/x-python]
Saving to: ‘’

100%[=====================================================================>] 1,524,722   --.-K/s   in 0.09s   

2016-05-26 11:10:33 (16.2 MB/s) - ‘’ saved [1524722/1524722]
[root@ip-10-0-1-55 ~]# python2.7
Collecting pip
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 675kB/s 
Collecting wheel
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
    100% |████████████████████████████████| 71kB 7.1MB/s 
Installing collected packages: pip, wheel
Successfully installed pip-8.1.2 wheel-0.29.0

[root@ip-10-0-1-55 dist-packages]# which pip2.7

Installing dependencies or packages from pip2.7.
[root@ip-10-0-1-55 ~]# pip2.7 install asciitree
Collecting asciitree
  Downloading asciitree-0.3.1.tar.gz
Building wheels for collected packages: asciitree
  Running bdist_wheel for asciitree ... done
  Stored in directory: /root/.cache/pip/wheels/10/14/df/88531e6ba23be75397d69921e580464f2850b6f45e982ac644
Successfully built asciitree
Installing collected packages: asciitree
Successfully installed asciitree-0.3.1


Popular posts from this blog

Script to create daily AMI of AWS server and delete AMI older than n no of days..

How to delete multiple user in linux

How to create users from ansible with public key and password.