Skip to content
This repository
Newer
Older
100644 139 lines (94 sloc) 4.489 kb
d4092257 »
2008-07-24 Start working on a INSTALL.txt document for building/installing numpy.
1 .. -*- rest -*-
2 .. vim:syntax=rest
3 .. NB! Keep this document a valid restructured document.
4
5 Building and installing NumPy
6 +++++++++++++++++++++++++++++
7
8 :Authors: Numpy Developers <numpy-discussion@scipy.org>
9 :Discussions to: numpy-discussion@scipy.org
10
11 .. Contents::
12
13 PREREQUISITES
14 =============
15
16 Building NumPy requires the following software installed:
17
5866d03a »
2013-04-25 MAINT: Update INSTALL.txt after dropping Python 2.4, 2.5.
18 1) For Python 2, Python__ 2.6.x or newer.
19 For Python 3, Python__ 3.2.x or newer.
d4092257 »
2008-07-24 Start working on a INSTALL.txt document for building/installing numpy.
20
21 On Debian and derivative (Ubuntu): python python-dev
22
23 On Windows: the official python installer on Python__ is enough
24
25 Make sure that the Python package distutils is installed before
26 continuing. For example, in Debian GNU/Linux, distutils is included
27 in the python-dev package.
28
29 Python must also be compiled with the zlib module enabled.
30
5aa65d94 »
2011-03-04 TYP: Fix typo.
31 2) nose__ (optional) 0.10.3 or later
7097f5ae »
2009-04-04 Mention nose for requirements.
32
33 This is required for testing numpy, but not for using it.
34
35 Python__ http://www.python.org
5aa65d94 »
2011-03-04 TYP: Fix typo.
36 nose__ http://somethingaboutorange.com/mrl/projects/nose/
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
37
5e62187c »
2008-11-08 Add mention of g77 vs gfortran in INSTALL notes.
38 Fortran ABI mismatch
39 ====================
40
41 The two most popular open source fortran compilers are g77 and gfortran.
42 Unfortunately, they are not ABI compatible, which means that concretely you
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
43 should avoid mixing libraries built with one with another. In particular,
44 if your blas/lapack/atlas is built with g77, you *must* use g77 when
45 building numpy and scipy; on the contrary, if your atlas is built with
46 gfortran, you *must* build numpy/scipy with gfortran.
5e62187c »
2008-11-08 Add mention of g77 vs gfortran in INSTALL notes.
47
48 Choosing the fortran compiler
49 -----------------------------
50
51 To build with g77:
52
53 python setup.py build --fcompiler=gnu
54
55 To build with gfortran:
56
57 python setup.py build --fcompiler=gnu95
58
59 How to check the ABI of blas/lapack/atlas
60 -----------------------------------------
61
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
62 One relatively simple and reliable way to check for the compiler used to
63 build a library is to use ldd on the library. If libg2c.so is a dependency,
64 this means that g77 has been used. If libgfortran.so is a dependency,
65 gfortran has been used. If both are dependencies, this means both have been
66 used, which is almost always a very bad idea.
5e62187c »
2008-11-08 Add mention of g77 vs gfortran in INSTALL notes.
67
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
68 Building with ATLAS support
69 ===========================
70
71 Ubuntu 8.10 (Intrepid)
72 ----------------------
73
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
74 You can install the necessary packages for optimized ATLAS with this
75 command:
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
76
77 sudo apt-get install libatlas-base-dev
78
6c948c5b »
2012-11-09 Fix typos.
79 If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
80 also install the corresponding package for optimal performance. For
81 example, for SSE2:
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
82
83 sudo apt-get install libatlas3gf-sse2
84
419cd5b7 »
2008-11-07 Disable looking for 3gf libraries; it causes more problem than it sol…
85 *NOTE*: if you build your own atlas, Intrepid changed its default fortran
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
86 compiler to gfortran. So you should rebuild everything from scratch,
87 including lapack, to use it on Intrepid.
419cd5b7 »
2008-11-07 Disable looking for 3gf libraries; it causes more problem than it sol…
88
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
89 Ubuntu 8.04 and lower
90 ---------------------
91
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
92 You can install the necessary packages for optimized ATLAS with this
93 command:
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
94
95 sudo apt-get install atlas3-base-dev
96
6c948c5b »
2012-11-09 Fix typos.
97 If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
98 also install the corresponding package for optimal performance. For
99 example, for SSE2:
5c08ef9e »
2008-11-07 Mention which packages to install for atlas on Ubuntu (Pre intrepid a…
100
101 sudo apt-get install atlas3-sse2
f1693130 »
2009-03-03 Add notes on Windows for AMD64.
102
103 Windows 64 bits notes
104 =====================
105
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
106 Note: only AMD64 is supported (IA64 is not) - AMD64 is the version most
107 people want.
f1693130 »
2009-03-03 Add notes on Windows for AMD64.
108
109 Free compilers (mingw-w64)
110 --------------------------
111
112 http://mingw-w64.sourceforge.net/
113
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
114 To use the free compilers (mingw-w64), you need to build your own
115 toolchain, as the mingw project only distribute cross-compilers
116 (cross-compilation is not supported by numpy). Since this toolchain is
117 still being worked on, serious compiler bugs can be expected. binutil 2.19
118 + gcc 4.3.3 + mingw-w64 runtime gives you a working C compiler (but the C++
119 is broken). gcc 4.4 will hopefully be able to run natively.
f1693130 »
2009-03-03 Add notes on Windows for AMD64.
120
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
121 This is the only tested way to get a numpy with a FULL blas/lapack (scipy
122 does not work because of C++).
f1693130 »
2009-03-03 Add notes on Windows for AMD64.
123
124 MS compilers
125 ------------
126
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
127 If you are familiar with MS tools, that's obviously the easiest path, and
128 the compilers are hopefully more mature (although in my experience, they
129 are quite fragile, and often segfault on invalid C code). The main drawback
130 is that no fortran compiler + MS compiler combination has been tested -
131 mingw-w64 gfortran + MS compiler does not work at all (it is unclear
132 whether it ever will).
f1693130 »
2009-03-03 Add notes on Windows for AMD64.
133
134 For python 2.6, you need VS 2008. The freely available version does not
135 contains 64 bits compilers (you also need the PSDK, v6.1).
136
7019591f »
2013-04-25 MAINT: Improve INSTALL.txt wording and wrap lines at 75 characters.
137 It is crucial to use the right MS compiler version. For python 2.6, you
138 must use version 15. You can check the compiler version with cl.exe /?.
Something went wrong with that request. Please try again.