Windows Installation — SpacePy v0.1.5 Manual

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- homepage|
- search|
- documentation »
- Installing SpacePy »

# Windows Installation

Although the SpacePy team makes every effort to keep code portable, and has expended considerable effort on Windows specifically, Windows is not a primary development platform for any of the developers. There may be some limitations and/or bugs under Windows which are not present in OSX or Linux. Bug reports and patches are always welcome.

## The Easy Way

Download the Python(x,y) distribution. The standard plugins include most of the dependencies required for SpacePy. Like SpacePy, this currently only supports 32-bit code, but will run on 64-bit machines.

If you wish to use the lanlstar module, you will need ffnet-0.7.1.win32-py2.7.exe.

If you wish to use CDF files, download and install the NASA CDF library. Again, the 32-bit installer is required, e.g. CDF34_1_0-SETUP-32.EXE. The default installation directory is recommended to help SpacePy find the library.

Finally, install SpacePy using the installer EXE. Be sure to choose the installer that matches your version of Python, either 2.6 or 2.7.

## The Hard Way

### Installing dependencies

This is a step-by-step guide to installing all of the spacepy dependencies individiually. This is the easiest way to install all dependencies by hand; if you are comfortable downloading, compiling, and installing Python modules yourself, that will also work.

Download and install the 32-bit Python Windows installer . The 2.7 version is recommended since most dependencies are now built against 2.7.

The following filenames are given for Python 2.7 and were the latest as of this writing; download the appropriate file for your version of Python and the latest version available of the required package.

Download and install numpy-1.7.1-win32-superpack-python2.7.exe.

Download and install scipy-0.12.0-win32-superpack-python2.7.exe.

Download and install matplotlib-1.2.1.win32-py2.7.exe.

Download and install h5py-2.1.3.win32-py2.7.msi.

Download and install networkx-1.7_py27.exe.

Download and install ffnet-0.7.1.win32-py2.7.exe.

If you wish to use CDF files, download and install the NASA CDF library. Again, the 32-bit installer is required, e.g. CDF34_1_0-SETUP-32.EXE. The default installation directory is recommended to help SpacePy find the library.

At this point, you can install SpacePy from the installer EXE, or continue to build SpacePy from source.

### Building and installing SpacePy

Edit your Windows path: Right-click my computer, choose properties, advanced, environment variables. Edit the path variable: append `;c:\python27;c:\python27\Scripts;c:\MinGW\bin` (more information).

Download the latest mingwget. mingw32 is the only C and Fortran compiler supported by SpacePy on Windows. Unzip into C:MinGW. At a command prompt (Start, Run, cmd) type:

    mingw-get install gcc g++ mingw32-make fortran

See also the mingw docs

Create a file `distutils.cfg` in `C:\Python27\Lib\distutils` (change appropriately for Python 2.6). It should contain:

    [build]
    compiler=mingw32

Unzip the SpacePy source documentation. Open a command prompt in the resulting directory and run:

    python setup.py install

## Developers

If you want to build the documentation yourself (rather than using the documentation shipped with SpacePy), install sphinx and numpydoc. The easiest way is via pip.

Download and run distribute_setup.py.

Download and run get-pip.py.

Then:

    pip install sphinx numpydoc

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- homepage|
- search|
- documentation »
- Installing SpacePy »