<!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 — 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> »</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> >= 4.4 (5.x is ideal)</li> <li><a class="reference" href="http://numpy.scipy.org">numpy</a> >= 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> >= 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’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’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 \ > 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’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 \ > 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’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> »</li> </ul> </div> <div class="footer"> © 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>