forked from liam2/liam2
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathINSTALL
More file actions
127 lines (86 loc) · 4.38 KB
/
INSTALL
File metadata and controls
127 lines (86 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Introduction
------------
To run LIAM2 from source, you first need to install all the
dependencies (see below), then (optionally) build the C extensions for
maximum performance, then simply run LIAM2 using:
python main.py import [your_import_file]
python main.py run [your_simulation_file]
List of dependencies
~~~~~~~~~~~~~~~~~~~~
LIAM2 uses a number of other open-source packages.
Required dependencies:
- Python 2.7.x (32b or 64b) - http://www.python.org/
- Numpy 1.7.0 or later - http://www.numpy.org/
- PyTables 2.2.1 or later - http://www.pytables.org
- Numexpr 2.0 or later - https://github.com/pydata/numexpr
- PyYAML 3.0.8 or later - http://pyyaml.org
- bcolz 0.7 or later - https://github.com/Blosc/bcolz
Optional dependencies:
- to view hdf5 files: vitables 2.1 - http://vitables.org
It requires PyQt4 - http://www.riverbankcomputing.com/software/pyqt/download
- to generate plots and charts: matplotlib 1.2 or later - http://matplotlib.org/
It requires python-dateutil - http://labix.org/python-dateutil
and pyparsing - http://pyparsing.wikispaces.com/
- to build the C extensions (see below):
Cython 0.16 or later - http://www.cython.org/
- to build the documentation to html (other formats need additional packages):
sphinx 1.0 or later - http://www.sphinx-doc.org/
- to create standalone executables:
cx-freeze 4.3 or later - http://cx-freeze.sourceforge.net/
Installation
------------
There are several options to install all those packages.
In order of increasing difficulty:
* using Anaconda
* getting binary packages from Christoph Gohlke (Windows only)
* getting third-party packages directly from their authors
Using Anaconda
~~~~~~~~~~~~~~
1) Install Anaconda 2.1 or later (Python 2.7). You can choose the 32-bit or
64-bit version.
2) Install ViTables. In a command prompt, type:
pip install https://vitables.googlecode.com/files/ViTables-2.1.tar.gz
Note that using other Python distributions should probably work, but we have
not tested that. As of this writing, Python(x,y) and WinPython are both missing
the "bcolz" package, so it would need to be installed from another source.
Getting binary packages from Christoph Gohlke (Windows only)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) Install Python 2.7.x (either 32 bits or 64 bits version):
http://www.python.org/download/releases/
2) Get and use the installers for all LIAM2 dependencies from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
Make sure you take the version of each package which match the version of
Python you have chosen.
Getting third-party packages directly from their authors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) Install Python 2.7.x (either 32 bits or 64 bits version):
http://www.python.org/download/releases/
2) Install all third-party packages manually. The problem with this approach
is that there is not a single way which works for all our dependencies.
Some packages provide binary installers for Windows (but often not for
64-bit), some do not. Some require a C compiler and have some dependencies
of their own before they can be installed. Some can be installed via
"pip install [package_name]" but some do not. In that case one usually has
to download the source and do "python setup.py install". In short, this
approach takes a lot of time, so I would only recommend it as a last resort,
especially if you want a 64-bit version of LIAM2 on Windows.
Building the C extensions
-------------------------
Additionally, if you want to get maximum performance, you will also need to
build the C extensions. This is optional but recommended.
For that you need to have cython (see above) and a C compiler installed, then
go to the src/ directory of LIAM2 and type:
python setup.py build_ext --inplace
If all goes according to plan, you should then be up and running.
Building the documentation
--------------------------
0) make sure both PYTHONDIR and PYTHONDIR\Scripts is in your system PATH
where PYTHONDIR is the directory where you installed Python
1) Install sphinx
2) Open a command prompt
3) Go to the documentation directory. For example:
cd liam2\doc\usersguide\
3) Launch the build:
make html
4) Open the result in your favourite web browser. It is located in:
build/html/index.html