http://code.google.com/p/pyamg/wiki/CompilingOnWinXP
PrerequisitesRefer to Installing for the list of required packages. If the required packages have already been installed then skip the corresponding commands below. (Step 0) Essential Compilers and LibrariesInstall MinGWDownload the Automated MinGW Installer. Run the installer and ensure that compilers for C, C++, and Fortran are selected. Now add the directory where the MinGW compilers are stored (usually C:\MinGW\bin)to your PATH. Permanent method: Control Panel->System->Advanced->Environment Variables->System Variables->Path Temporary method: From the command line run: set PATH=c:\mingw\bin\;%PATH% Install Python 2.5Install Python 2.5 using the official installer. LAPACKLAPACK (including BLAS) Extract LAPACK to LIBS\lapack-3.1.1 (or whatever the current version is) Set environment variables for subsequent steps set BLAS_SRC=..\lapack-3.1.1\BLAS\SRC set LAPACK_SRC=..\lapack-3.1.1\SRC Install SubversionWe'll need Subversion to download the latest versions of NumPy, SciPy, and PyAMG. There are several binary distributions available. The one provided by Silk SVN is easy to install. (Step 1) Download Source Code(Recommended) Obtain official versions of nose, NumPy, SciPy, and PyAMGwget http://python-nose.googlecode.com/files/nose-0.10.1.tar.gz wget http://superb-east.dl.sourceforge.net/sourceforge/numpy/numpy-1.2.1.tar.gz wget http://voxel.dl.sourceforge.net/sourceforge/scipy/scipy-0.7.0.tar.gz wget http://pyamg.googlecode.com/files/pyamg-1.0.0.tar.gz tar xvfz nose-0.10.1.tar.gz tar xvfz numpy-1.2.1.tar.gz tar xvfz scipy-0.7.0.tar.gz tar xvfz pyamg-1.0.0.tar.gz Alternative Links: Nose 0.10.1 Numpy 1.2.1 SciPy 0.7 PyAMG 1.0 (Alternative) Obtain development versions of nose, NumPy, SciPy, and PyAMGsvn checkout http://python-nose.googlecode.com/svn/trunk/ nose svn checkout http://svn.scipy.org/svn/numpy/trunk/ numpy svn checkout http://svn.scipy.org/svn/scipy/trunk/ scipy svn checkout http://pyamg.googlecode.com/svn/trunk/ pyamg (Step 2) Install PackagesInstall nosecd nose python setup.py install cd .. Install NumPycd numpy python setup.py config --compiler=mingw32 build --compiler=mingw32 install cd .. Note: Simply rerun the previous command a few times if the following error occurs.g77.exe: C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs: Too many open files error: Command "C:\MinGW\bin\g77.exe <some arguments> failed with exit status 1 Try rerunning setup command until build succeeds. Install SciPycd scipy python setup.py config --compiler=mingw32 build --compiler=mingw32 install cd .. Install PyAMGcd pyamg python setup.py config --compiler=mingw32 build --compiler=mingw32 install cd.. (Optional) Build binary installer with: python setup.py build --compiler=mingw32 bdist_wininst (Step 3) Test InstallationUsing Python or IPython (recommended) to run the following commands import pyamg pyamg.test() should have output similar to Running unit tests for pyamg NumPy version 1.2.1 NumPy is installed in /usr/lib/python2.5/site-packages/numpy SciPy version 0.7.0 SciPy is installed in /usr/lib/python2.5/site-packages/scipy Python version 2.5.2 (r252:60911, Jul 31 2008, 17:31:22) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] nose version 0.10.4 PyAMG version 1.0.0 PyAMG is installed in /usr/lib/python2.5/site-packages/pyamg .......................................................................................................................... ---------------------------------------------------------------------- Ran 122 tests in 27.593s OK Testing NumPy and SciPy is done in similar fashion: import numpy numpy.test() import scipy scipy.test() |
PyAMG 1.0.0 fails to run with pythonxy, but compiles just fine. When using with pythonxy, use development versions of nose and PyAMG.
This page http://www.lfd.uci.edu/~gohlke/pythonlibs/ maintains a bunch of Windows binaries for numerical Python on Windows, including PyAMG. This is a good resource, but not maintained by us, so use at your own risk.