Browse files

Merge branch 'new_install_instructions'

  • Loading branch information...
cournape committed Apr 14, 2009
1 parent 0a71b5f commit c2f8b6f9cc0b4c1663a3142c26309c09691ea7c3
Showing with 69 additions and 153 deletions.
  1. +69 −153 INSTALL.txt
@@ -6,174 +6,101 @@ for updates of this document.
.. Contents::
+It is *strongly* recommended that you use the binary packages on your platform
+if they are available, in particular on Windows and Mac OS X. You should not
+attempt to build SciPy if you are not familiar with compiling softwares from
-SciPy requires the following software installed:
+SciPy requires the following software installed for your platform:
1) Python__ 2.4.x or newer
- Debian packages: python python-dev
- Make sure that the Python package distutils is installed before
- continuing. For example, in Debian GNU/Linux, distutils is included
- in the python-dev package.
- Python must also be compiled with the zlib module enabled.
-2) NumPy__ 1.2.0 or newer
- Debian package: python-numpy
+2) NumPy__ 1.3.0 or newer
-3) Complete LAPACK__ library (see NOTES 1, 2, 3)
- Debian/Ubuntu packages (g77): atlas3-base atlas3-base-dev
- Various SciPy packages do linear algebra computations using the LAPACK
- routines. SciPy's scripts can use number of different LAPACK
- library setups, including optimized LAPACK libraries such as ATLAS__ or
- the Accelerate/vecLib framework on OS X. The notes below give
- more information on how to prepare the build environment so that
- SciPy's scripts can use whatever LAPACK library setup one has.
+It is recommended to use the mingw__ compilers on Windows: you will need gcc
+(C), g++ (C++) and g77 (Fortran) compilers.
-The following software is optional, but SciPy can use these if present
-for extra functionality:
-1) C, C++, Fortran 77 compilers (see COMPILER NOTES)
- To build SciPy or any other extension modules for Python, you'll need
- a C compiler. Scipy also requires a C++ compiler.
- Various SciPy modules use Fortran 77 libraries, so you'll need also
- at least a Fortran 77 compiler installed.
- gcc__ 3.x compilers are recommended. gcc 2.95 and 4.0.x also work on
- some platforms, but may be more problematic (see COMPILER NOTES).
+Blas/Lapack are core routines for linear algebra (vector/matrix operations).
+You should use ATLAS__ with a full LAPACK, or simple BLAS/LAPACK built with g77
+from netlib__ sources. Building those libraries on windows may be difficult, as
+they assume a unix-style environment. Please use the binaries if you don't feel
+comfortable with cygwin, make and similar tools.
- Debian packages: gcc g++ g77
+Mac OS X
-2) FFTW__ x (see Lib/fftpack/NOTES.txt)
+It is recommended to use gcc. gcc is available for free when installing
+Xcode__, the developer toolsuite on Mac OS X. You also need a fortran compiler,
+which is not included with Xcode: you should use gfortran from this page:
- FFTW 2.1.x and 3.x work.
- Debian packages: fftw2 fftw-dev fftw3 fftw3-dev
+Please do NOT use gfortran from, it is known to generate
+buggy scipy binaries.
+Mac OS X includes the Accelerate framework: it should be detected without any
+intervention when building SciPy.
-1) To use ATLAS, version 3.2.1 or newer and a *complete* LAPACK library
- are required. See
- for instructions. Please be aware than building your own atlas is
- error-prone, and should be avoided as much as possible if you don't want to
- spend time on build issues. Use the blas/lapack packaged by your
- distribution on Linux; on Mac Os X, you should use the vecLib/Accelerate
- framework, which are available when installing the apple development tools.
- Below follows basic steps for building ATLAS+LAPACK from scratch.
- In case of trouble, consult the documentation of the corresponding
- software.
- * Get and unpack
- to ``/path/to/src/``.
+Most common distributions include all the dependencies. Here are some
+instructions for the most common ones:
- * Copy proper ``/path/to/src/LAPACK/INSTALL/``
- to ``/path/to/src/LAPACK/``.
+Ubuntu >= 8.10
- * Build LAPACK::
+You can get all the dependencies as follows::
- cd /path/to/src/LAPACK
- make lapacklib # On 400MHz PII it takes about 15min.
+ sudo apt-get install python python-dev libatlas3-base-dev gcc gfortran g++
- that will create lapack_LINUX.a when using
- INSTALL/, for example.
- If using Intel Fortran Compiler, see additional notes below.
+Ubuntu < 8.10, Debian
- * Get the latest stable ATLAS sources from
- and unpack to ``/path/to/src/``.
+You can get all the dependencies as follows::
- * Build ATLAS::
+ sudo apt-get install python python-dev atlas3-base-dev gcc g77 g++
- cd /path/to/src/ATLAS
- make # Number of questions will be asked
- make install arch=Linux_PII # This takes about 45min.
+OpenSuse >= 10
- where arch may vary (see the output of the previous command).
- * Make optimized LAPACK library::
- cd /path/to/src/ATLAS/lib/Linux_PII/
- mkdir tmp; cd tmp
- ar x ../liblapack.a
- cp /path/to/src/LAPACK/lapack_LINUX.a ../liblapack.a
- ar r ../liblapack.a *.o
- cd ..; rm -rf tmp
- * Move all ``lib*.a`` files from ``/path/to/src/ATLAS/lib/Linux_PII/``,
- say, to ``/usr/local/lib/atlas/``.
- Also copying ``/path/to/src/ATLAS/include/{cblas.h,clapack.h}`` to
- ``/usr/local/lib/atlas/`` might be a good idea.
- * Define environment variable ATLAS that contains path to the directory
- where you moved the atlas libraries. For example, in bash run::
- export ATLAS=/usr/local/lib/atlas
-2) If you are willing to sacrifice the performance (by factor of 5 to 15
- for large problems) of the linalg module then it is possible to build
- SciPy without ATLAS. For that you'll need either Fortran LAPACK/BLAS
- libraries installed in your system or Fortran LAPACK/BLAS sources to be
- accessible by SciPy setup scripts (use ``LAPACK_SRC``/``BLAS_SRC``
- environment variables to indicate the location of the corresponding
- source directories). More details of how to do this are on the SciPy
- Wiki, at:
-3) Users of Debian (and derivatives like Ubuntu) can use the following
- deb packages::
- atlas2-headers
- and
- atlas2-base atlas2-base-dev
- or
- atlas2-sse atlas2-sse-dev
- or
- atlas2-sse2 atlas2-sse2-dev
- or
- atlas2-3dnow atlas2-3dnow-dev
- It is not necessary to install blas or lapack libraries in addition.
- 4) Compiler flags customization (FFLAGS, CFLAGS, etc...). If you customize
- CFLAGS and other related flags from the command line or the shell environment,
- beware that is does not have the standard behavior of appending options.
- Instead, it overrides the options. As such, you have to give all options in the
- flag for the build to be successful.
+Fedora Core
@@ -191,7 +118,7 @@ Use the command::
Before building and installing from SVN, remove the old installation
(e.g. in /usr/lib/python2.4/site-packages/scipy or
-$HOME/lib/python2.4/site-packages/scipy). Then type:
+$HOME/lib/python2.4/site-packages/scipy). Then type::
cd scipy
rm -rf build
@@ -205,7 +132,10 @@ INSTALLATION
First make sure that all SciPy prerequisites are installed and working
properly. Then be sure to remove any old SciPy installations (e.g.
/usr/lib/python2.4/site-packages/scipy or $HOME/lib/python2.4/
+site-packages/scipy). On windows, if you installed scipy previously from a
+binary, use the remove facility from the add/remove softwares panel, or remote
+the scipy directory by hand if you installed from sources (e.g.
+C:\Python24\Lib\site-packages\scipy for python 2.4).
From tarballs
@@ -216,14 +146,15 @@ directory, and run
python install
This may take several minutes to an hour depending on the speed of your
-computer. This may require root privileges. To install to a
-user-specific location instead, run
+computer. To install to a user-specific location instead, run::
python install --prefix=$MYDIR
where $MYDIR is, for example, $HOME or $HOME/usr.
+ ** Note 1: On Unix, you should avoid installing in /usr, but rather in
+ /usr/local or somewhere else. /usr is generally 'owned' by your package
+ manager, and you may overwrite a packaged scipy this way.
@@ -239,9 +170,9 @@ To run the full test suite use
Please note that you must have version 0.10 or later of the 'nose' test
framework installed in order to run the tests. More information about nose is
-available here:
+available on the website__.
@@ -353,21 +284,6 @@ To fix: follow the instructions in
to create a complete liblapack.a. Then copy liblapack.a to the same
location where libatlas.a is installed and retry with scipy build.
-Using ATLAS 3.2.1
-If import clapack fails with the following error
- ImportError: .../ : undefined symbol: clapack_sgetri
-then you most probably have ATLAS 3.2.1 but linalg module was built
-for newer versions of ATLAS.
- 1) Remove Lib/linalg/clapack.pyf
- 2) Rebuild/reinstall scipy.
Using non-GNU Fortran Compiler
If import scipy shows a message

0 comments on commit c2f8b6f

Please sign in to comment.