Open adam2392 opened 3 years ago
This upgrade is a bit of a mess, we probably need to backport the update to maint/0.23. If you pip install --upgrade pyvista
do things work with 0.24.dev0 / main
?
I don't think so but will try it tomorrow and lyk!
0.30.1 is the latest and they are designed to be upgraded simultaneously so I'm at least a little bit optimistic :)
Ayaye... I think the best way to solve this is to udpate pyvista
:sweat_smile:
Running it again:
Platform: Linux-5.5.4-050504-generic-x86_64-with-glibc2.10
Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0]
Executable: /home/adam2392/Documents/sickkids/.venv/bin/python3
CPU: x86_64: 24 cores
Memory: Unavailable (requires "psutil" package)
mne: 0.23.0
numpy: 1.20.2 {blas=openblas, lapack=openblas}
scipy: 1.6.2
matplotlib: 3.4.1 {backend=module://ipympl.backend_nbagg}
sklearn: 0.24.1
numba: 0.53.1
nibabel: 3.2.1
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: 1.2.4
mayavi: Not found
pyvista: 0.30.1 {OpenGL 4.5.0 NVIDIA 460.73.01 via GeForce GTX 750/PCIe/SSE2}
vtk: 9.0.1
PyQt5: 5.15.4
None
I get:
/home/adam2392/Documents/sickkids/.venv/lib/python3.8/site-packages/pyvista/jupyter/notebook.py:56: UserWarning: Failed to use notebook backend:
Please install `ipyvtklink` to use this feature: https://github.com/Kitware/ipyvtklink
Falling back to a static output.
warnings.warn(f'Failed to use notebook backend: \n\n{e}\n\n'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-39066c44604d> in <module>
1 get_ipython().run_line_magic('matplotlib', 'widget')
----> 2 fig = plot_alignment(raw.info, subject='fsaverage', subjects_dir=subjects_dir,
3 surfaces=['pial'], coord_frame='mri')
4 az, el, focalpoint = 160, -70, [0.067, -0.040, 0.018]
5 mne.viz.set_3d_view(fig,
<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)
365 viewer = self.plotter.show(
366 jupyter_backend="ipyvtklink", return_viewer=True)
--> 367 viewer.layout.width = None # unlock the fixed layout
368 # main widget
369 if self._dock is None:
~/Documents/sickkids/.venv/lib/python3.8/site-packages/PIL/Image.py in __getattr__(self, name)
539 )
540 return self._category
--> 541 raise AttributeError(name)
542
543 @property
AttributeError: layout
This is now on a linux machine too.
Oh just kidding, I guess maybe my ipyvklink isn't installing properly...
from running pip install ipytklink
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /home/adam2392/Documents/sickkids/.venv/bin/python3.8 /home/adam2392/Documents/sickkids/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpicomhibk
cwd: /tmp/pip-install-zepgf25i/orjson
Complete output (11 lines):
💥 maturin failed
Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
Caused by: `cargo metadata` exited with an error: error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z mutable-noalias=yes -C target-feature=+sse2 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: the option `Z` is only accepted on the nightly compiler
Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-install-zepgf25i/orjson/pip-wheel-metadata', '--interpreter', '/home/adam2392/Documents/sickkids/.venv/bin/python3.8', '--manylinux=off', '--strip=on']' returned non-zero exit status 1.
Checking for Rust toolchain....
Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-install-zepgf25i/orjson/pip-wheel-metadata --interpreter /home/adam2392/Documents/sickkids/.venv/bin/python3.8 --manylinux=off --strip=on`
----------------------------------------
ERROR: Command errored out with exit status 1: /home/adam2392/Documents/sickkids/.venv/bin/python3.8 /home/adam2392/Documents/sickkids/.venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpicomhibk Check the logs for full command output.
Alternatively I tried on my mac:
I get: Error displaying widget: model not found
Not sure if this is related to the original issue tho...?
This is strange, I'm on linux myself and I never got this :thinking: Can you open an issue on https://github.com/Kitware/ipyvtklink?
By scrolling through the closed issue there I found https://github.com/Kitware/ipyvtklink/issues/27 which seems to have the same "model not found" issue, maybe it is related?
Done!
It seems there is no movement in the other repo regarding this. I think it's still having the same issue. I was wondering is there any way then to replicate something like plot_ecog
on a Mac using Jupyter or such? Or any tips/suggestions?
Is there perhaps even an older version of pyvista/mne/etc. combo that might work?
Describe the bug
I am attempting to use the 3D backend notebook viewer for plotting an ecog brain. I get the following error:
However, this is because
ipyvtk_simple
is now named...ipyvtk-link
:(Steps to reproduce
Set
mne.viz.set_3d_backend("notebook")
and then runplot_ecog.py
example.Additional information
Also ran w/
mne==0.23