Installing Python 2.7.5 with Pandas 0.11.0 and NumPy 1.7.1 on Ubuntu 12.04 LTS using Virtualenv

At first install the openssl development package, which is libssl-dev, this will enable python compile
with ssl support, which we will later need to install libraries using pip:

sudo apt-get install libssl-dev

install pip and virtualenv:

sudo apt-get install python-pip
sudo pip install virtualenv

Create a local directory for new python distributoin

mkdir ~/.localpython

Download and install Python 2.7.5 in that local directory

tar jxvf Python-2.7.5.tar.bz2
cd Python-2.7.5/
make clean (optional)
./configure --prefix=/home/naved/.localpython
make install

Go to your python project directory for which you want to use the new python dist and create

virtual environment directory:

cd Coding/
virtualenv py2.7.5 --python=/home/naved/.localpython/bin/python

A ‘py2.7.5/’ directory will be created containing pip, easy_install, python (2.7.5)

Now install Numpy 1.7.1 and Pandas 0.11.0 for this python distribution (2.7.5):

py2.7.5/bin/pip install numpy==1.7.1

py2.7.5/bin/pip install pandas==0.11.0 isn’t able to install pytz dependency and
py2.7.5/bin/easy_install pandas==0.11.0 has ‘503: Backend is unhealthy’ issue, so
we have to manually get the pandas-0.11.0.tar.gz’s link and use that to install.

py2.7.5/bin/easy_install<br />

Activate virtual env and test installation:

source py2.7.5/bin/activate
>>import numpy as np
>>import pandas as pd

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s