Question How to install mayavi module so that I can use it in Jupyter Notebook? I use Windows 10. For me it's a nightmare.
I use the latest Anaconda and in order not to break dependencies, I don't want to use PIP (I'm not sure if this sentence makes sense).
My understanding of the installation process is tiny, I don't understand much. Since I tried a lot of commands, maybe it'd be better to start everything from scratch, i.e. create new environment.
About I'm just learning Python, especially matplotlib package. I need to visualise calculations. I managed to use it for 2d animations and 3d with one surface. Unfortunatelly, matplotlib is bad if multiple surfaces are plotted in the same coordinate system. I learned that mayavi is better for such graphs.
My trials On the latest version of Python there was a problem, so I created a second environment and installed Python 3.6 there using Anaconda Navigator. Then I installed mayavi, using Anaconda Navigator as well. Then I installed missing packages. Now I'm stuck. When I run this code on Jupyter Notebook:
from mayavi import mlab
I get an error ('Nie można odnaleźć określonego modułu' means 'The specified module could not be found'):
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\vtkmodules\vtkCommonCore.py in <module>
4 # use relative import for installed modules
----> 5 from .vtkCommonCorePython import *
6 except ImportError:
ImportError: DLL load failed: Nie można odnaleźć określonego modułu.
During handling of the above exception, another exception occurred:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-67847bc6bfd0> in <module>
----> 1 from mayavi import mlab
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\mlab.py in <module>
14 # Mayavi imports
15 from mayavi.core.common import process_ui_events
---> 16 from mayavi.tools.camera import view, roll, yaw, pitch, move
17 from mayavi.tools.figure import figure, clf, gcf, savefig, \
18 draw, sync_camera, close, screenshot
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\tools\camera.py in <module>
22 # We can't use gcf, as it creates a circular import in camera management
23 # routines.
---> 24 from .engine_manager import get_engine
25
26
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\tools\engine_manager.py in <module>
11 # Local imports
12 from mayavi.preferences.api import preference_manager
---> 13 from mayavi.core.registry import registry
14 from mayavi.core.engine import Engine
15 from mayavi.core.off_screen_engine import OffScreenEngine
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\core\registry.py in <module>
14
15 # Local imports.
---> 16 from mayavi.core.metadata import Metadata, import_symbol
17
18 # A logger for this module.
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\core\metadata.py in <module>
9 # Enthought library imports.
10 from traits.api import HasTraits, Str, Callable, Either, List, Instance
---> 11 from mayavi.core.pipeline_info import PipelineInfo
12
13
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\core\pipeline_info.py in <module>
10 from traits.api import HasTraits, Enum, List
11
---> 12 from .utils import get_tvtk_dataset_name
13
14 # The list of datasets supported.
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\mayavi\core\utils.py in <module>
1 import numpy as np
----> 2 import vtk
3 from vtk.numpy_interface import dataset_adapter as dsa
4 from vtk.numpy_interface import algorithms as algs
5
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\vtk.py in <module>
30 all_spec = importlib.util.find_spec('vtkmodules.all')
31 all_m = importlib.util.module_from_spec(all_spec)
---> 32 all_spec.loader.exec_module(all_m)
33
34 # import vtkmodules
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\vtkmodules\all.py in <module>
5
6 # --------------------------------------
----> 7 from .vtkCommonCore import *
8 from .vtkCommonMath import *
9 from .vtkCommonMisc import *
F:\Program_Files\Anaconda3\envs\byuzycMayavi\lib\site-packages\vtkmodules\vtkCommonCore.py in <module>
7 # during build and testing, the modules will be elsewhere,
8 # e.g. in lib directory or Release/Debug config directories
----> 9 from vtkCommonCorePython import *
ModuleNotFoundError: No module named 'vtkCommonCorePython'
On the list of packages in Anaconda Navigator there is a tick sign next to vtk and vtk--PKG. I googled this site and I tried the code I found there. However, all of them give errors (DLL load failed).
Some of the solutions on SO are for Linux, some of them are old and seem out of date. Some of them link to this site, but I don't know what to do with this list.