Informatique / Python / Installing Minconda Python 2.7 with Mayavi 4.5.0 on Ubuntu 14.04
LTS
Download the miniconda (Python 2.7, 64-bit) installer on https://conda.io/miniconda.html or
directly from this (official) link Miniconda2-latest-Linux-x86_64.sh.
Here are the commands for downloading and starting installation:
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash ./Miniconda2-latest-Linux-x86_64.sh
Here is part of the output of the install process where default directory is changed to /fcopt/miniconda2 ( a
writable directory for current user called <username>)
...
Do you approve the license terms? [yes|no]
>>> yes
Miniconda2 will now be installed into this location:
/home/<username>/miniconda2
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/<username>/miniconda2] >>> /fcopt/miniconda2
PREFIX=/fcopt/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 ...
installing: wheel-0.29.0-py27_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 /home/<username>/.bashrc ? [yes|no]
[no] >>>
You may wish to edit your .bashrc or prepend the Miniconda2 install location:
$ export PATH=/fcopt/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=<MINICONDA2_PATH>/bin:$PATH
where <MINICONDA2_PATH> is the installation directory (i.e. /home/<username>/miniconda2 by default or
/fcopt/miniconda2 in the previous intallation example)
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
fontconfig: 2.12.1-3
freetype: 2.5.5-2
glib: 2.50.2-1
harfbuzz: 0.9.39-2
libiconv: 1.14-0
libpng: 1.6.30-1
libxml2: 2.9.4-0
mayavi: 4.5.0-py27_0
mkl: 2017.0.3-0
numpy: 1.13.1-py27_0
pango: 1.40.3-1
pcre: 8.39-1
pixman: 0.34.0-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) .
If all is ok we obtain the following figure:
If you have the following warning message when using mayavi:
>>> from mayavi import mlab
GLib-GIO-Message: Using the ’memory’ GSettings backend. Your settings will not be
saved or shared with other applications.
it can be corrected by setting the GIO_EXTRA_MODULES environment variable as
export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
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.