~ubuntu-branches/ubuntu/hardy/mayavi2/hardy-backports

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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!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>Installation &mdash; Mayavi2 v2.2.0 documentation</title>
    <link rel="stylesheet" href="_static/default.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.2.0',
          COLLAPSE_MODINDEX: false,
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/interface.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="contents" title="Global table of contents" href="contents.html" />
    <link rel="index" title="Global index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="Mayavi2 v2.2.0 documentation" href="index.html" />
    <link rel="next" title="An overview of Mayavi" href="overview.html" />
    <link rel="prev" title="Introduction" href="introduction.html" />
  </head>
  <body>
    <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="overview.html" title="An overview of Mayavi"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Mayavi2 v2.2.0 documentation</a> &raquo;</li>
      </ul>
    </div>
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section">
<h1 id="id1"><span id="installation"></span>Installation<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<p>Up-to-date install instructions are always available at the <a class="reference" href="https://svn.enthought.com/enthought/wiki/MayaVi">Mayavi2</a>
web page.  The following instructions are likely not up-to-date but
should give you a good idea of the general installation procedure and
a start on where to look.</p>
<div class="section">
<h2 id="requirements">Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
<p>Mayavi requires at the very minimum the following packages:</p>
<blockquote>
<ul class="simple">
<li><a class="reference" href="http://www.vtk.org">VTK</a> &gt;= 4.4 (5.x is ideal)</li>
<li><a class="reference" href="http://numpy.scipy.org">numpy</a> &gt;= 1.0.1</li>
<li><a class="reference" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> (for installation and egg builds)</li>
<li><a class="reference" href="https://svn.enthought.com/enthought/wiki/TVTK">TVTK</a> (<cite>enthought.tvtk</cite>)</li>
<li><a class="reference" href="https://svn.enthought.com/enthought/wiki/Traits">Traits</a> &gt;= 2.0 (<cite>enthought.traits</cite>)</li>
</ul>
</blockquote>
<p>The following requirements are really optional but strongly recommended,
especially if you are new to mayavi:</p>
<blockquote>
<ul class="simple">
<li><a class="reference" href="https://svn.enthought.com/enthought/wiki/Envisage">Envisage</a> == 2.x (<cite>enthought.envisage</cite>)</li>
<li><a class="reference" href="http://www.wxpython.org">wxPython</a> 2.6.x or 2.8.x</li>
</ul>
</blockquote>
<p>One can install the requirements in several ways.</p>
<blockquote>
<ul>
<li><p class="first">Win32: Under Win32 the best way to get all the dependencies is to
use Enthought&#8217;s <a class="reference" href="http://code.enthought.com/enstaller">enstaller</a>.  This will also let you install mayavi.</p>
</li>
<li><p class="first">Linux: Most Linux distributions will have installable binaries
available for the some of the above.  For example, under <a class="reference" href="http://www.debian.org">Debian</a> or
<a class="reference" href="http://www.ubuntu.com">Ubuntu</a> you would need <tt class="docutils literal"><span class="pre">python-vtk</span></tt>, <tt class="docutils literal"><span class="pre">python-wxgtk2.6</span></tt>,
<tt class="docutils literal"><span class="pre">python-setuptools</span></tt>, <tt class="docutils literal"><span class="pre">python-numpy</span></tt>.  More information on
specific distributions and how you can get the requirements for
each of these should be available from the list of distributions
here:</p>
<blockquote>
<p><a class="reference" href="https://svn.enthought.com/enthought/wiki/Install">https://svn.enthought.com/enthought/wiki/Install</a></p>
</blockquote>
</li>
<li><p class="first">Mac OS X: The best available instructions for this platform are
available on the <a class="reference" href="https://svn.enthought.com/enthought/wiki/IntelMacPython25">IntelMacPython25</a> page.</p>
</li>
</ul>
</blockquote>
<p>There are several ways to install <a class="reference" href="https://svn.enthought.com/enthought/wiki/TVTK">TVTK</a>, <a class="reference" href="https://svn.enthought.com/enthought/wiki/Traits">Traits</a> and Mayavi.  These
are described in the following.</p>
</div>
<div class="section">
<h2 id="python-packages-eggs">Python packages: Eggs<a class="headerlink" href="#python-packages-eggs" title="Permalink to this headline"></a></h2>
<p><a class="reference" href="https://svn.enthought.com/enthought/wiki/MayaVi">Mayavi2</a> is part of the Enthought Tool Suite (<a class="reference" href="http://code.enthought.com/ets">ETS</a>).  As such, it is
distributed as part of ETS and therefore binary packages and source
packages of ETS will contain Mayavi2. Mayavi releases are almost always
made along with an ETS release.  You may choose to install all of ETS or
just Mayavi2 alone from a release.</p>
<p>ETS has been organized into several different Python packages.  These
packages are distributed as Python <a class="reference" href="http://peak.telecommunity.com/DevCenter/PythonEggs">Eggs</a>.  Python eggs are fairly
sophisticated and carry information on dependencies with other eggs.  As
such they are rapidly becoming the standard for distributing Python
packages.</p>
<p>There are primarily two ways to use ETS eggs.</p>
<blockquote>
<ol class="arabic simple">
<li>The first and easiest is to use pre-built eggs built for your
particular platform.  More instructions on this are below.</li>
<li>The second is to build the eggs from the source tarballs.  This is
also fairly easy to do if you have a proper build environment.</li>
</ol>
</blockquote>
<p>Given this background please see the following:</p>
<blockquote>
<ul>
<li><p class="first"><a class="reference" href="https://svn.enthought.com/enthought/wiki/Install">Enthought Install</a> describes how ETS can be installed with eggs.
Check this page first.  It contains information on how to install
the prebuilt binary eggs for various platforms along with any
dependencies.</p>
</li>
<li><p class="first">If there aren&#8217;t any pre-built eggs for your platform, first make
sure the requirements are installed, and then build and install
the eggs like so:</p>
<pre>$ easy_install -f http://code.enthought.com/enstaller/eggs/source \
    &gt; enthought.mayavi</pre>
<p>This one command will download, build and install all the required
ETS related modules that mayavi needs for the latest ETS release.
If you run into trouble please check the <a class="reference" href="https://svn.enthought.com/enthought/wiki/Install">Enthought Install</a> pages.
Note that the above is really one line, it has been split with the
<tt class="docutils literal"><span class="pre">\</span></tt> character into two lines in order to fit on the printed
version of this document.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section">
<h2 id="the-bleeding-edge-svn">The bleeding edge: SVN<a class="headerlink" href="#the-bleeding-edge-svn" title="Permalink to this headline"></a></h2>
<p>If you want to get the latest development version of Mayavi, we
recommend that you check it out from SVN.  Mayavi depends on several
packages that are part of ETS.  It is highly likely that the
in-development mayavi version may depend on some feature of an as yet
unreleased component.  Therefore, it is very convenient to get all the
relevant ETS projects that mayavi recursively depends on in one single
checkout.  In order to do this easily, Dave Peterson has created a
package called <a class="reference" href="https://svn.enthought.com/enthought/wiki/SVNScripts">ETSProjectTools</a>.  This must first be installed and then
any of ETS related repositories may be checked out.  Here is how you can
get the latest development sources.</p>
<blockquote>
<ol class="arabic">
<li><p class="first">Install <a class="reference" href="https://svn.enthought.com/enthought/wiki/SVNScripts">ETSProjectTools</a> like so:</p>
<pre>$ svn co https://svn.enthought.com/svn/enthought/ETSProjectTools/trunk \
       ETSProjectTools
$ cd ETSProjectTools
$ python setup.py install</pre>
<p>This will give you several useful scripts like <tt class="docutils literal"><span class="pre">etsco</span></tt>, <tt class="docutils literal"><span class="pre">etsup</span></tt>,
<tt class="docutils literal"><span class="pre">etsdevelop</span></tt> etc.</p>
</li>
<li><p class="first">To get just the sources for mayavi and all its dependencies do this:</p>
<pre>$ etsco enthought.mayavi</pre>
<p>This will look at the latest available mayavi, parse its ETS
dependencies and check out the relevant sources.  If you want a
particular mayavi release you may do:</p>
<pre>$ etsco "enthought.mayavi==2.0.2"</pre>
<p>If you&#8217;d like to get the sources for an entire ETS release do this
for example:</p>
<pre>$ etsco "ets==2.7.0"</pre>
<p>This will checkout all the relevant sources from SVN.  Be patient,
this will take a while.  More options for the <tt class="docutils literal"><span class="pre">etsco</span></tt> tool are
available in the <a class="reference" href="https://svn.enthought.com/enthought/wiki/SVNScripts">ETSProjectTools</a> page.</p>
</li>
<li><p class="first">Once the sources are checked out you may either do an:</p>
<pre>$ etsdevelop</pre>
<p>This will  install all the checked out sources via a <tt class="docutils literal"><span class="pre">setup.py</span>
<span class="pre">develop</span></tt> applied to each package.</p>
</li>
<li><p class="first">Alternatively, you may want to build binary eggs, of the sources.
At this time ETSProjectTools does not provide a build script,
however you can use the <tt class="docutils literal"><span class="pre">egg_builder.py</span></tt> script from here:</p>
<pre>$ svn cat https://svn.enthought.com/svn/enthought/sandbox/egg_builder.py \
      &gt; egg_builder.py</pre>
<p>This script can be used to build eggs like so (here we assume that
<tt class="docutils literal"><span class="pre">etsco</span></tt> checked out the sources into <tt class="docutils literal"><span class="pre">ets-2.7.0</span></tt>):</p>
<pre>$ cd ets-2.7.0
$ python ../egg_builder.py</pre>
<p>This will build all the eggs and put them inside a <tt class="docutils literal"><span class="pre">dist</span></tt>
subdirectory.  The mayavi development egg and its dependencies  may
be installed via:</p>
<pre>$ easy_install -f dist enthought.mayavi</pre>
<p>Alternatively, if you&#8217;d like just <tt class="docutils literal"><span class="pre">enthought.mayavi</span></tt> installed via
<tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">develop</span></tt> with the rest as binary eggs you may do:</p>
<pre>$ cd enthought.mayavi_x.y.z
$ python setup.py develop -f ../dist</pre>
<p>This will pull in any dependencies from the built eggs.</p>
</li>
</ol>
</blockquote>
<p>You should now have the latest version of Mayavi installed and usable.</p>
</div>
<div class="section">
<h2 id="testing-your-installation">Testing your installation<a class="headerlink" href="#testing-your-installation" title="Permalink to this headline"></a></h2>
<p>The easiest way to test if your installation is OK is to run the mayavi2
application like so:</p>
<div class="highlight"><pre><span class="n">mayavi2</span>
</pre></div>
<p>To get more help on the command try this:</p>
<div class="highlight"><pre><span class="n">mayavi2</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
<p><tt class="docutils literal"><span class="pre">mayavi2</span></tt> is the mayavi application.  On some platforms like win32
you will need to double click on the <tt class="docutils literal"><span class="pre">mayavi2.exe</span></tt> program found in
your <tt class="docutils literal"><span class="pre">Python2X\Scripts</span></tt> folder.  Make sure this directory is in your
path.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Mayavi can be used in a variety of other ways but the <tt class="docutils literal"><span class="pre">mayavi2</span></tt>
application is the easiest to start with.</p>
</div>
<p>If you have the source tarball of mayavi or have checked out the sources
from the SVN repository, you can run the examples in
<tt class="docutils literal"><span class="pre">enthought.mayavi*/examples</span></tt>.  There are plenty of example scripts
illustrating various features.  Tests are available in the
<tt class="docutils literal"><span class="pre">enthought.mayavi*/tests</span></tt> sub-directory.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><img class="logo" src="_static/mayavi-logo.png" alt="Logo"/></p>
            <h3>Table Of Contents</h3>
            <ul>
<li><a class="reference" href="">Installation</a><ul>
<li><a class="reference" href="#requirements">Requirements</a></li>
<li><a class="reference" href="#python-packages-eggs">Python packages: Eggs</a></li>
<li><a class="reference" href="#the-bleeding-edge-svn">The bleeding edge: SVN</a></li>
<li><a class="reference" href="#testing-your-installation">Testing your installation</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="introduction.html" title="previous chapter">Introduction</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="overview.html" title="next chapter">An overview of Mayavi</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/installation.txt">Show Source</a></li>
            </ul>
            <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>
        </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"
             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="overview.html" title="An overview of Mayavi"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Mayavi2 v2.2.0 documentation</a> &raquo;</li>
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2008, Prabhu Ramachandran, Gaël Varoquaux.
      Last updated on Jun 29, 2008.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
    </div>
  </body>
</html>