This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
/
installation.html
267 lines (257 loc) · 15.6 KB
/
installation.html
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2. Installation Instructions — pymc v2.1.alpha documentation</title>
<link rel="stylesheet" href="_static/pymcdoc.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '2.1.alpha',
COLLAPSE_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="pymc v2.1.alpha documentation" href="index.html" />
<link rel="next" title="3. Tutorial" href="tutorial.html" />
<link rel="prev" title="1. Introduction" href="introduction.html" />
</head>
<body>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<img src="_static/banner21.png" alt="PyMC logo" />
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
accesskey="M">modules</a> |</li>
<li class="right" >
<a href="tutorial.html" title="3. Tutorial"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="introduction.html" title="1. Introduction"
accesskey="P">previous</a> |</li>
<li><a href="http://code.google.com/p/pymc/">PyMC home</a> | </li>
<li><a href="index.html">User Guide</a> | </li>
<li><a href="api.html">API Documentation</a>»</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/icon_small.png" alt="Logo"/>
</a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="">2. Installation Instructions</a><ul>
<li><a class="reference external" href="#dependencies">2.1. Dependencies</a></li>
<li><a class="reference external" href="#installation-using-easyinstall">2.2. Installation using EasyInstall</a></li>
<li><a class="reference external" href="#installing-from-pre-built-binaries">2.3. Installing from pre-built binaries</a></li>
<li><a class="reference external" href="#compiling-the-source-code">2.4. Compiling the source code</a><ul>
<li><a class="reference external" href="#windows">2.4.1. Windows</a></li>
<li><a class="reference external" href="#mac-os-x-or-linux">2.4.2. Mac OS X or Linux</a></li>
</ul>
</li>
<li><a class="reference external" href="#development-version">2.5. Development version</a></li>
<li><a class="reference external" href="#running-the-test-suite">2.6. Running the test suite</a></li>
<li><a class="reference external" href="#bugs-and-feature-requests">2.7. Bugs and feature requests</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="introduction.html"
title="previous chapter">1. Introduction</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="tutorial.html"
title="next chapter">3. Tutorial</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/installation.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="installation-instructions">
<h1>2. Installation Instructions<a class="headerlink" href="#installation-instructions" title="Permalink to this headline">¶</a></h1>
<p>PyMC is known to run on Mac OS X, Linux and Windows, but in theory should be
able to work on just about any platform for which Python, a Fortran compiler
and the NumPy module are available. However, installing some extra
depencies can greatly improve PyMC’s performance and versatility.
The following describes the required and optional dependencies and takes you
through the installation process.</p>
<div class="section" id="dependencies">
<h2>2.1. Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
<p>PyMC requires some prerequisite packages to be present on the system.
Fortunately, there are currently only a few dependencies, and all are
freely available online.</p>
<ul class="simple">
<li><a class="reference external" href="http://www.python.org/.">Python</a> version 2.5.</li>
<li><a class="reference external" href="http://www.scipy.org/NumPy">NumPy</a> (1.2 or newer): The fundamental scientific programming package, it provides a
multidimensional array type and many useful functions for numerical analysis.</li>
<li><a class="reference external" href="http://matplotlib.sourceforge.net/">Matplotlib</a> (optional): 2D plotting library which produces publication
quality figures in a variety of image formats and interactive environments</li>
<li><a class="reference external" href="http://www.pytables.org/moin">pyTables</a> (optional): Package for managing hierarchical datasets and
designed to efficiently and easily cope with extremely large amounts of data.
Requires the <a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> library.</li>
<li><a class="reference external" href="http://code.google.com/p/pydot/">pydot</a> (optional): Python interface to Graphviz’s Dot language, it allows
PyMC to create both directed and non-directed graphical representations of models.
Requires the <a class="reference external" href="http://www.graphviz.org/">Graphviz</a> library.</li>
<li><a class="reference external" href="http://www.scipy.org/">SciPy</a> (optional): Library of algorithms for mathematics, science
and engineering.</li>
<li><a class="reference external" href="http://ipython.scipy.org/">IPython</a> (optional): An enhanced interactive Python shell and an
architecture for interactive parallel computing.</li>
<li><a class="reference external" href="http://somethingaboutorange.com/mrl/projects/nose/">nose</a> (optional): A test discovery-based unittest extension (required
to run the test suite).</li>
</ul>
<p>There are prebuilt distributions that include all required dependencies. For
Mac OSX users, we recommend the <a class="reference external" href="http://www.activestate.com/Products/ActivePython/">MacPython</a> distribution, the
<a class="reference external" href="http://www.enthought.com/products/epddownload.php">Enthought Python Distribution</a>, or Python 2.5.1 that ships with
OSX 10.5 (Leopard). Windows users should download and install the
<a class="reference external" href="http://www.enthought.com/products/epddownload.php">Enthought Python Distribution</a>. The Enthought Python Distribution comes
bundled with these prerequisites. Note that depending on the currency of these
distributions, some packages may need to be updated manually.</p>
<p>If instead of installing the prebuilt binaries you prefer (or have) to build
<tt class="docutils literal"><span class="pre">pymc</span></tt> yourself, make sure you have a Fortran and a C compiler. There are free
compilers (gfortran, gcc) available on all platforms. Other compilers have not been
tested with PyMC but may work nonetheless.</p>
</div>
<div class="section" id="installation-using-easyinstall">
<h2>2.2. Installation using EasyInstall<a class="headerlink" href="#installation-using-easyinstall" title="Permalink to this headline">¶</a></h2>
<p>The easiest way to install PyMC is to type in a terminal:</p>
<div class="highlight-python"><pre>easy_install pymc</pre>
</div>
<p>Provided <a class="reference external" href="http://peak.telecommunity.com/DevCenter/EasyInstall">EasyInstall</a> (part of the <a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> module) is installed
and in your path, this should fetch and install the package from the
<a class="reference external" href="http://pypi.python.org/pypi">Python Package Index</a>. Make sure you have the appropriate administrative
privileges to install software on your computer.</p>
</div>
<div class="section" id="installing-from-pre-built-binaries">
<h2>2.3. Installing from pre-built binaries<a class="headerlink" href="#installing-from-pre-built-binaries" title="Permalink to this headline">¶</a></h2>
<p>Pre-built binaries are available for Windows XP and Mac OS X. There are at least
two ways to install these:</p>
<ol class="arabic simple">
<li>Download the installer for your platform from <a class="reference external" href="http://pypi.python.org/pypi/pymc/">PyPI</a>.</li>
<li>Double-click the executable installation package, then follow the
on-screen instructions.</li>
</ol>
<p>For other platforms, you will need to build the package yourself from source.
Fortunately, this should be relatively straightforward.</p>
</div>
<div class="section" id="compiling-the-source-code">
<h2>2.4. Compiling the source code<a class="headerlink" href="#compiling-the-source-code" title="Permalink to this headline">¶</a></h2>
<p>First download the source code tarball from <a class="reference external" href="http://pypi.python.org/pypi/pymc/">PyPI</a> and unpack it. Then move
into the unpacked directory and follow the platform specific instructions.</p>
<div class="section" id="windows">
<h3>2.4.1. Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h3>
<p>One way to compile PyMC on Windows is to install <a class="reference external" href="http://www.mingw.org/">MinGW</a> and <a class="reference external" href="http://www.mingw.org/wiki/MSYS">MSYS</a>. MinGW is
the GNU Compiler Collection (GCC) augmented with Windows specific headers and
libraries. MSYS is a POSIX-like console (bash) with UNIX command line tools.
Download the <a class="reference external" href="http://sourceforge.net/project/showfiles.php?group_id=2435">Automated MinGW Installer</a> and double-click on it to launch
the installation process. You will be asked to select which
components are to be installed: make sure the g77 compiler is selected and
proceed with the instructions. Then download and install <a class="reference external" href="http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe">MSYS-1.0.exe</a>,
launch it and again follow the on-screen instructions.</p>
<p>Once this is done, launch the MSYS console, change into the PyMC directory and
type:</p>
<div class="highlight-python"><pre>python setup.py install</pre>
</div>
<p>This will build the C and Fortran extension and copy the libraries and python
modules in the C:/Python25/Lib/site-packages/pymc directory.</p>
</div>
<div class="section" id="mac-os-x-or-linux">
<h3>2.4.2. Mac OS X or Linux<a class="headerlink" href="#mac-os-x-or-linux" title="Permalink to this headline">¶</a></h3>
<p>In a terminal, type:</p>
<div class="highlight-python"><pre>python setup.py build
sudo python setup.py install</pre>
</div>
<p>The <cite>sudo</cite> command is required to install PyMC into the Python <tt class="docutils literal"><span class="pre">site-packages</span></tt>
directory if it has restricted privileges. You will be prompted for a password,
and provided you have superuser privileges, the installation will proceed.</p>
</div>
</div>
<div class="section" id="development-version">
<h2>2.5. Development version<a class="headerlink" href="#development-version" title="Permalink to this headline">¶</a></h2>
<p>You can check out the bleeding edge version of the code from the <a class="reference external" href="http://subversion.tigris.org/">subversion</a>
repository:</p>
<div class="highlight-python"><pre>svn checkout http://pymc.googlecode.com/svn/trunk/ pymc</pre>
</div>
<p>Previous versions are available in the <tt class="docutils literal"><span class="pre">/tags</span></tt> directory.</p>
</div>
<div class="section" id="running-the-test-suite">
<h2>2.6. Running the test suite<a class="headerlink" href="#running-the-test-suite" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">pymc</span></tt> comes with a set of tests that verify that the critical components
of the code work as expected. To run these tests, users must have <a class="reference external" href="http://somethingaboutorange.com/mrl/projects/nose/">nose</a>
installed. The tests are launched from a python shell:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">import</span> <span class="nn">pymc</span>
<span class="n">pymc</span><span class="o">.</span><span class="n">test</span><span class="p">()</span>
</pre></div>
</div>
<p>In case of failures, messages detailing the nature of these failures will
appear. In case this happens (it shouldn’t), please report
the problems on the <a class="reference external" href="http://code.google.com/p/pymc/issues/list.">issue tracker</a>, specifying the version you are using and
the environment.</p>
</div>
<div class="section" id="bugs-and-feature-requests">
<h2>2.7. Bugs and feature requests<a class="headerlink" href="#bugs-and-feature-requests" title="Permalink to this headline">¶</a></h2>
<p>Report problems with the installation, bugs in the code or feature request at
the <a class="reference external" href="http://code.google.com/p/pymc/issues/list.">issue tracker</a>. Comments and questions are welcome and should be
addressed to PyMC’s <a class="reference external" href="mailto:pymc%40googlegroups.com">mailing list</a>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="modindex.html" title="Global Module Index"
>modules</a> |</li>
<li class="right" >
<a href="tutorial.html" title="3. Tutorial"
>next</a> |</li>
<li class="right" >
<a href="introduction.html" title="1. Introduction"
>previous</a> |</li>
<li><a href="http://code.google.com/p/pymc/">PyMC home</a> | </li>
<li><a href="index.html">User Guide</a> | </li>
<li><a href="api.html">API Documentation</a>»</li>
</ul>
</div>
<div class="footer">
© Copyright 2008, Chris Fonnesbeck, Anand Patil, David Huard.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.7.
</div>
</body>
</html>