block by nikcub 49885e62cf8b0bff8cf9780aeb2bf7e3

Install Python 2.7.11 on Ubuntu 14.04

Install latest Python 2.7.11 on Ubuntu 14.04

This script will install the latest version of the 2.7.x branch of Python alongside the system Python in the users local directory and it will symlink all the binaries in ~/bin

Any app or daemon that you require to run with the latest Python just run it as either the separate user or make sure it is running from the Python linked into `/bin

Arguments

install-python.sh <version> <path>

version defaults to 2.7.11

path defaults to /opt/$USER

Install as a separate user

$ sudo useradd python-latest -m -s /bin/bash
$ sudo adduser python-latest sudo
$ sudo passwd python-latest
$ su -l python-latest

Download Script

$ wget "https://gist.githubusercontent.com/nikcub/49885e62cf8b0bff8cf9780aeb2bf7e3/raw/99713739596dc71584abc02cc4c56a7020a649d7/install-python.sh" -O install-python.sh

Install Script

$ sh install-python.sh
(python will install)
$ python -V
Python 2.7.11
$ which python
/home/user/bin/python

install-python.sh