Skip to content

Instantly share code, notes, and snippets.

@subsetpark
Created June 16, 2015 15:48
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save subsetpark/367f0d3fde503a1e481c to your computer and use it in GitHub Desktop.
Save subsetpark/367f0d3fde503a1e481c to your computer and use it in GitHub Desktop.
Building Python 2.7.10 on Ubuntu 14.04 LTS
$ sudo apt-get install -y gcc-multilib g++-multilib libffi-dev libffi6 libffi6-dbg python-crypto python-mox3 python-pil python-ply libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libgdbm-dev dpkg-dev quilt autotools-dev libreadline-dev libtinfo-dev libncursesw5-dev tk-dev blt-dev libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libsqlite3-dev libgpm2 mime-support netbase net-tools bzip2
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar xvf Python-2.7.10.tgz
$ cd Python-2.7.10/
$ ./configure --prefix /usr/local/lib/python2.7.10 --enable-ipv6
$ make
$ sudo make install
$ /usr/local/lib/python2.7.10/bin/python -V
Python 2.7.10
@RanaZubair
Copy link

I installed python 2.7.10 according to the given description above, but my ubuntu pc is showing old version 2.7.6 what is the solution for this ....

@jquacinella
Copy link

Because --prefix /usr/local/lib/python2.7.10 installs the python binary to /usr/local/lib/python2.7.10/bin/python

@manoelf
Copy link

manoelf commented Oct 29, 2016

Thanks bro!

@Legend-of-Success
Copy link

@jquacinella how can I install python packages for that path?(using pip)

@yaswanthnks
Copy link

Thanks bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment