*  Informatique / Python / Installing Minconda Python 2.7 with Mayavi 4.5.0 on MacOS Sierra

pict pict

Download the miniconda (Python 2.7, 64-bit) installer on https://conda.io/miniconda.html or directly from this (official) link Miniconda2-latest-MacOSX-x86_64.sh.

Here are the commands for downloading and starting installation :

bash Miniconda2-latest-MacOSX-x86_64.sh

Here is part of the output of the install process where <username> is the name of the current user
...  
Do you approve the license terms? [yes|no]  
>>> yes  
 
Miniconda2 will now be installed into this location:  
/Users/<username>/miniconda2  
 
  - Press ENTER to confirm the location  
  - Press CTRL-C to abort the installation  
  - Or specify a different location below  
 
[/Users/<username>/miniconda2] >>>  
PREFIX=/Users/<username>/miniconda2  
installing: python-2.7.13-0 ...  
installing: asn1crypto-0.22.0-py27_0 ...  
installing: cffi-1.10.0-py27_0 ...  
installing: conda-env-2.6.0-0 ...  
...  
Python 2.7.13 :: Continuum Analytics, Inc.  
creating default environment...  
installation finished.  
Do you wish the installer to prepend the Miniconda2 install location  
to PATH in your /Users/<username>/.bash_profile ? [yes|no]  
[yes] >>> no  
 
You may wish to edit your .bashrc or prepend the Miniconda2 install location:  
 
$ export PATH=/Users/<username>/miniconda2/bin:$PATH  
 
Thank you for installing Miniconda2!  
 
Share your notebooks and packages on Anaconda Cloud!  
Sign up for free: https://anaconda.org

Thereafter, in a terminal we modify the PATH environment variable :

export PATH=/Users/<username>/miniconda2/bin:$PATH

To install the mayavi Python package, one can execute the following command in the terminal with the PATH environment variable correctly set :

conda install mayavi=4.5.0

Here is a part of the output
Fetching package metadata .........  
Solving package specifications: .  
 
Package plan for installation in environment /fcopt/miniconda2:  
 
The following NEW packages will be INSTALLED:  
 
    apptools:   4.4.0-py27_0  
 
    cairo:      1.14.8-0  
    configobj:  5.0.6-py27_0  
    envisage:   4.5.1-py27_0  
    freetype:   2.5.5-2  
    libpng:     1.6.30-1  
    mayavi:     4.5.0-py27_0  
    mkl:        2017.0.3-0  
    numpy:      1.13.1-py27_0  
    pyface:     5.1.0-py27_0  
    pygments:   2.2.0-py27_0  
    pyqt:       4.11.4-py27_4  
    qt:         4.8.7-4  
    sip:        4.18-py27_0  
    traits:     4.6.0-py27_0  
    traitsui:   5.1.0-py27_0  
    vtk:        6.3.0-py27_1  
 
The following packages will be UPDATED:  
 
    conda:      4.3.21-py27_0 --> 4.3.25-py27_0  
 
Proceed ([y]/n)? y  
...

To quickly test the mayavi package, one can run the python code mayavi_boy.py (774 bytes) .

python mayavi_boy.py

One can install some other usefull packages (for me) as scipy, ipython, ...

conda install scipy ipython

To date, due to conflict in packages version, it’s not possible to install (with mayavi package) the matplotlib package for a version >1.5.1.