0todd0000 / spm1d

One-Dimensional Statistical Parametric Mapping in Python
GNU General Public License v3.0
63 stars 21 forks source link

Getting Started in Python #4

Closed kbsmale closed 10 years ago

kbsmale commented 10 years ago

When trying to import the spm1d folder into Canopy, an import error arises where it can't find the 'tables' module in io.py

importing spm1d

0todd0000 commented 10 years ago

Hi, that error means that the PyTables package is not installed.

PyTables is a Python package which interfaces with the free hierarchical data format "HDF5", and spm1d uses PyTables for reading/writing data files, including MATLAB data (.mat) files. http://www.hdfgroup.org/HDF5/

In Canopy you can install PyTables easily using the Package Manager as depicted in the screenshots below.

From the Welcome screen you'll need to first log in using your Enthought Account. To install PyTables you'll need either an Academic Account ($0): https://store.enthought.com/#canopy-academic or one of their paid subscriptions: https://store.enthought.com

canopy0

After entering the Package Manager you can use the search box to search for PyTables. If you're not logged in, or if you don't have an Academic or paid account, you'll see a "Canopy" flag like this:

canopy1

After logging in with your Academic or paid account you'll be able to install PyTables:

canopy2

After installing PyTables the "No module named tables" error should go away. If you're interested in accessing PyTables functionality directly, you can do so using the following import command:

import tables