Installing PyTables 3.0.0 in Virtualenv on Ubuntu 12.04

1. Install hdf5:

sudo apt-get install libhdf5-serial-dev

2. Activate Virtualenv:

source ~/Coding/python_2.7.5_venv/bin/activate

3. Install Cython, Numexpr:

Numexpr: download from http://code.google.com/p/numexpr
$ python setup.py build
$ sudo python setup.py install

or

~/Coding/python_2.7.5_venv/bin/pip install -U numexpr
wget http://cython.org/release/Cython-0.19.1.tar.gz
tar zxvf Cython-0.19.1.tar.gz
cd Cython-0.19.1
sudo python setup.py install

4. Install PyTables

~/Coding/python_2.7.5_venv/bin/pip install git+https://github.com/PyTables/PyTables.git@v.3.0.0#egg=tables

5. Test pytables
To test the installation, run python or ipython and:

In [0]: import tables
In [1]: tables.test()

The test will fail, test with pytables functions from ipython:

In [2]: import pandas as pd
In [3]: import numpy as np
In [4]: import tables
In [5]: df = pd.DataFrame(np.random.randn(8,3))
In [6]: store = pd.HDFStore('test.h5')
In [7]: store.put('df',df)
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s