forked from gem/oq-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
141 lines (95 loc) · 3.48 KB
/
README.txt
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
OpenQuake System
==============
Until we get this updated, you should please follow the instructions here for installation:
https://github.com/gem/openquake/wiki
THE BELOW INSTRUCTIONS ARE DEPRECATED:
Dependencies
------------
For the most part the Python packages in here can be installed using `pip`
(python-pip on ubuntu) or your favorite package manager.
* libxslt-dev
* gfortran
* python-numpy
* python-scipy
Is it recommended that you install the following Python packages with
easy_install (http://pypi.python.org/pypi/setuptools).
* matplotlib
On OS X a good way to install the pieces that are not Python (if you don't
already use MacPorts or Fink) is called homebrew: http://mxcl.github.com/homebrew/
* gdal
* Brew install gdal itself, then
* sudo pip install gdal (FAILS, so):
* Use the package from http://www.kyngchaos.com/software:frameworks
* osgeo (pip install)
* jpype
* lxml
* PyYAML
* python-gflags
* RabbitMQ (Installed using brew install rabbitmq)
* SciPy
* You will need gfortran, for os x that is at: http://r.research.att.com/gfortran-4.2.3.dmg
* After that `pip install scipy` should work.
* If it doesn't and there is an error about ppc64... well it is more complex,
see Troubleshooting
* Shapely
* requires geos (c library, also called libgeos)
* Sphinx (for building documentation only)
* Guppy (http://guppy-pe.sourceforge.net)
* Redis 2.x or greater (http://code.google.com/p/redis/downloads/list)
You'll need to mess with PYTHONPATH (in your .bash_profile file), or add a .pth file, both for gdal and for openquake itself.
To get RabbitMQ set up, execute the following:
sudo rabbitmq-server &
sudo rabbitmqctl add_user celeryuser celery
sudo rabbitmqctl add_vhost celeryvhost
sudo rabbitmqctl set_permissions -p celeryvhost celeryuser ".*" ".*" ".*"
(Feel free to customize these settings and update celeryconfig.py)
Running Tests
-------------
To run the python tests use:
::
celeryd &
python runtests.py
To run the java tests use:
::
ant
Running Demos
-------------
To run the command-line demo:
::
./demo.sh --debug
Tools / Services
----------------
* git
* git-cl (http://neugierig.org/software/git/?r=git-cl)
::
git clone git://neugierig.org/git-cl.git
ln -s /path/to/git-cl/git-cl /usr/bin/git-cl
ln -s /path/to/git-cl/upload.py /usr/bin/upload.py
* GitHub (http://github.com/gem/openquake)
* Rietveld (http://gemreview.appspot.com) - requires a google account
* PivotalTracker (http://pivotaltracker.com)
Troubleshooting
---------------
SciPy can be a real pain to install on OS X. These steps should work if the
procedure mentioned above does not.
Make sure you have installed numpy >= 1.4, if you have installed GDAL you
might have an older version of numpy that may be loaded by Python before your
new installation on numpy. To resolve this, change the python module loading
order by editing /Python/2.6/site-packages/gdal.pth
from:
import sys; sys.path.insert(0,'/Library/Frameworks/GDAL.framework/Versions/1.7/
Python/site-packages')
to:
import sys; sys.path.append('/Library/Frameworks/GDAL.framework/Versions/1.7/
Python/site-packages')
::
svn co http://svn.scipy.org/svn/numpy/trunk numpy
svn co http://svn.scipy.org/svn/scipy/trunk scipy
cd numpy
# edit gnu.py and find the word "ppc64" and remove it from the array
vim numpy/distutils/fcompiler/gnu.py
python setup.py build
sudo python setup.py install
cd ../scipy
python setup.py build
sudo python setup.py install