-
Notifications
You must be signed in to change notification settings - Fork 4
Mayavi Install
Many of the physicists use mayavi in their notebooks to visualize 3d data in python and in jupyter notebooks. We need this on the dev VMs so we can cross check the results from mayavi and vtk.js.
I wasn't able to get it installed in the py2 environment, but was able to get it working in py3 and maybe that will lead to a path for py2 (required by warp for example).
First get X11 working.
Edit the vm VagrantFile and edit the line to turn on x11 forwarding:
config.ssh.forward_x11 = true
In the vm, "sudo su - " to root and install:
dnf install vtk
dnf install xorg-x11-apps
dnf install libxkbcommon-x11
Then exit the vm, run "vagrant halt" and then vssh again.
Check that x11 is working correctly by running "xclock".
Now install the mayavi packages into py3:
pyenv activate py3
pip install mayavi
pip install PyQt5
Hopefully when you now run "mayavi2" it will run OK. If not see if you can see the problem by running:
export QT_DEBUG_PLUGINS=1
mayavi2
If mayavi is installed correctly, then this should work in python 3:
from mayavi import mlab