Here is a nice list of steps (and dead ends) to get scikits.timeseries going on Mac OS X Snow Leopard. I am putting it up here for myself and for other people wishing to get going as soon as possible.
So, scikits.timeseries lists python >= 2.4, setuptools, numpy >= 1.3.0, Scipy >= 0.7.0, matplotlib >= 0.98.0 and pytables >= 2.0.
I am assuming you already have matplotlib and scipy and all that, and Snow Leopard comes with python 2.6 already installed. Now you need to get pytables going. For that you need to install HDF. If you go to the HDF site and you follow all the way to the Download page you may think you’ve hit the jackpot when they mention there’s a nice pre-built binary for you to download. Don’t do it, as it will not work with pytables! Rather, download the source for 1.8.4 patch 1 and compile it yourself (tar -xzf tarfile; ./configure –prefix=/usr/local && make && sudo make install). Should be fine if you have xcode installed.
Now you are ready for pytables. sudo easy_install tables works fine if you’ve got hdf installed as per above. Last step is to install timeseries itself. sudo easy_install scikits.timeseries works fine.
If the import fails (go into python and type import scikits.timeseries) with a reference to numpy 1.2.1, you may need to delete the numpy that Apple packaged with Snow Leopard. Simply do sudo rm -r /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/{numpy-1.2.1-py2.6.egg-info,numpy_APPLE_DEFAULT}
Timeseries is a great package for working with timeseries that have dates attached. Perfect for timeseries segmentation and analysis for your PhD!
Leave a Reply