Ipyvtk_simple is not ipyvtk_link in 3D notebook viewer
See original GitHub issueDescribe the bug
I am attempting to use the 3D backend notebook viewer for plotting an ecog brain. I get the following error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~/Documents/sickkids/.venv/lib/python3.8/site-packages/pyvista/plotting/plotting.py in show(self, title, window_size, interactive, auto_close, interactive_update, full_screen, screenshot, return_img, cpos, use_ipyvtk, **kwargs)
4323 try:
-> 4324 from ipyvtk_simple.viewer import ViewInteractiveWidget
4325 except ImportError:
ModuleNotFoundError: No module named 'ipyvtk_simple'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-20-ea5cd7c5fb7d> in <module>
----> 1 fig = plot_alignment(
2 raw.info,
3 subject="E1",
4 subjects_dir=subjects_dir,
5 surfaces=["pial"],
<decorator-gen-151> in plot_alignment(info, trans, subject, subjects_dir, surfaces, coord_frame, meg, eeg, fwd, dig, ecog, src, mri_fiducials, bem, seeg, fnirs, show_axes, dbs, fig, interaction, verbose)
~/Documents/sickkids/.venv/lib/python3.8/site-packages/mne/viz/_3d.py in plot_alignment(***failed resolving arguments***)
1098 renderer.set_camera(azimuth=90, elevation=90,
1099 distance=0.6, focalpoint=(0., 0., 0.))
-> 1100 renderer.show()
1101 return renderer.scene()
1102
~/Documents/sickkids/.venv/lib/python3.8/site-packages/mne/viz/backends/_notebook.py in show(self)
360 # viewer
361 if LooseVersion(pyvista.__version__) < LooseVersion('0.30'):
--> 362 viewer = self.plotter.show(
363 use_ipyvtk=True, return_viewer=True)
364 else: # pyvista>=0.30.0
~/Documents/sickkids/.venv/lib/python3.8/site-packages/pyvista/plotting/plotting.py in show(self, title, window_size, interactive, auto_close, interactive_update, full_screen, screenshot, return_img, cpos, use_ipyvtk, **kwargs)
4324 from ipyvtk_simple.viewer import ViewInteractiveWidget
4325 except ImportError:
-> 4326 raise ImportError('Please install `ipyvtk_simple` to use this feature:'
4327 '\thttps://github.com/Kitware/ipyvtk-simple')
4328 # Have to leave the Plotter open for the widget to use
ImportError: Please install `ipyvtk_simple` to use this feature: https://github.com/Kitware/ipyvtk-simple
However, this is because ipyvtk_simple
is now named… ipyvtk-link
😦
Steps to reproduce
Set mne.viz.set_3d_backend("notebook")
and then run plot_ecog.py
example.
Additional information
Platform: macOS-10.16-x86_64-i386-64bit
Python: 3.8.6 | packaged by conda-forge | (default, Jan 25 2021, 23:22:12) [Clang 11.0.1 ]
Executable: /Users/adam2392/Documents/sickkids/.venv/bin/python
CPU: i386: 8 cores
Memory: Unavailable (requires "psutil" package)
mne: 0.24.dev0
numpy: 1.20.1 {blas=openblas, lapack=openblas}
scipy: 1.6.0
matplotlib: 3.3.4 {backend=agg}
sklearn: 0.24.1
numba: 0.52.0
nibabel: 3.2.1
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: 1.2.2
mayavi: Not found
pyvista: 0.28.1 {pyvistaqt=0.4.0, OpenGL 4.1 ATI-4.4.17 via AMD Radeon Pro 560 OpenGL Engine}
vtk: 9.0.1
PyQt5: 5.15.2
Also ran w/ mne==0.23
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Kitware/ipyvtklink: minimalist ipywidget to interface ... - GitHub
A Docker image is prebuilt and hosted in the ipyvtklink repository's packages. and open the vtk. ipynb notebook.
Read more >Jupyter Notebook Plotting — PyVista 0.37.0 documentation
At the moment, itkwidgets and ipyvtklink are incompatible with Jupyterlab 3, and will result in a “Error displaying widget: model not found” message...
Read more >Plots not showing in Jupyter notebook - python - Stack Overflow
If you are working with a Jupyter Notebook then you can add the following line to the top cell where you call all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Done!
Oh just kidding, I guess maybe my ipyvklink isn’t installing properly…
from running
pip install ipytklink