Skip to content

Instantly share code, notes, and snippets.

@thkprado
Created February 18, 2016 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thkprado/08c1c81210892b10e3ea to your computer and use it in GitHub Desktop.
Save thkprado/08c1c81210892b10e3ea to your computer and use it in GitHub Desktop.
Install Python - Source Compile Method
Unix dependencies:
$ sudo apt-get install -y make build-essential zlib1g-dev wget curl
?libssl-dev
?libbz2-dev
?libreadline-dev
?libsqlite3-dev
?llvm
?libncurses5-dev
?libncursesw5-dev
Python:
$ cd ~
$ mkdir tmp
$ mkdir opt
$ cd tmp
$ wget https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tar.xz
$ tar xvf Python-2.7.11.tar.xz
$ cd Python-2.7.11
$ ./configure --prefix=$HOME/opt/Python-2.7.11
$ make && make install
pip:
$ cd ~/opt/opt/Python-2.7.11/bin
$ wget https://bootstrap.pypa.io/get-pip.py
$ ./python get-pip.py
virtualenv:
$ ./pip install virtualenv
Creating the Virtual Python Environment:
$ ./virtualenv ~/newpythonenv
Activate environment:
$ source ~/newpythonenv/bin/activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment