@@ -10,15 +10,35 @@ We will use the
1010[Mayavi](https://docs.enthought.com/mayavi/mayavi/)
1111package to plot grid data.
1212
13- This can be installed with
13+ The installation of mayavi is a bit tricky, as it requires some
14+ specific versions of its dependencies. The easiest way to install it is
15+ to install it in a fresh python 3.11 environment
16+ ```bash
17+ mamba create -n mayavi python=3.11 mayavi
1418```
15- mamba install -c conda-forge mayavi
19+ Afterwards, activate the environment with
20+ ```bash
21+ mamba activate mayavi
1622```
17- If you wish to use Mayavi with Jupyter notebooks, you will need to install
18- the ipyevents package with
23+ Confirm that you are in the environment with
24+ ```bash
25+ which python
1926```
20- mamba install -c conda-forge ipyevents
27+ Once in the environment, you can install the other dependencies like this:
28+ ```bash
29+ mamba install numpy scipy
2130```
31+
32+ If you wish to use Mayavi with Jupyter notebooks, you will need to install
33+ an older version of Jupyter notebooks along with some other packages:
34+ ```bash
35+ mamba install "notebook=6.5.*" ipywidgets ipyevents
36+ ```
37+
38+ However, if you are using MacOS, this will not let you use the
39+ Mayavi together with Jupyter notebooks, and there is no easy way to fix it.
40+ Therefore, you should use Mayavi with the "classic" Python.
41+
2242~~~
2343
2444### Functions for Isosurface Plotting
@@ -30,7 +50,7 @@ We start by importing the necessary packages.
3050```
3151~~~ admonish tip
3252If you are using Jupyter notebooks, you will need to run the following cell
33- to initialize Mayavi immediately after importing it:
53+ to initialise Mayavi immediately after importing it:
3454```python
3555mlab.init_notebook()
3656```
0 commit comments