-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG, ENH: macOS 11 compatiblity for STC plots #8959
Conversation
fa4956e
to
a2547b1
Compare
Sets `QT_MAC_WANTS_LAYER=1` for STC plots via PyVista. Was required on my system with macOS 11.2.1, Qt 5.12.9, pyqt 5.12.3 (installed from `conda-forge`) Previous fix via mne-tools#8554 didn't cover STC plots. cc @cbrnr, @GuillaumeFavelier
a2547b1
to
2aead9c
Compare
It's strange that conda-forge is still stuck at this old PyQt version (5.12 was released 2 years ago). Versions >=5.15.2 don't have this problem anymore. |
It seems compilation of Qt 5.15 is a blocker : |
@GuillaumeFavelier please merge if you think this is okay :) |
mne/viz/backends/renderer.py
Outdated
@@ -112,6 +114,11 @@ def set_3d_backend(backend_name, verbose=None): | |||
_reload_backend(backend_name) | |||
MNE_3D_BACKEND = backend_name | |||
|
|||
# Qt5 macOS 11 compatibility | |||
if (backend_name == 'pyvista' and sys.platform == 'darwin' and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't think the backend name matters, mayavi will have the same problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've dropped the pyvista
check in 77f36c9
doc/changes/latest.inc
Outdated
@@ -86,6 +86,8 @@ Enhancements | |||
|
|||
- Reading and writing FIFF files whose filenames end with ``_meg.fif.gz``, ``_eeg.fif(.gz)``, and ``_ieeg.fif(.gz)`` doesn't emit a warning anymore; this improves interobaility with BIDS-formatted datasets (:gh:`8868` by `Richard Höchenberger`_) | |||
|
|||
- macOS 11 compatibility for `~mne.SourceEstimate` plots (:gh:`8959` by `Richard Höchenberger`_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changelog entry should explicitly mention that an env var is being created. Even if right now this only affects MNE, it can potentially affect other programs in future so we should communicate it prominently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that these variables will not be visible to any other applications - only to the current Python interpreter and all subprocesses it might spawn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ echo ${FOO}; python -c "import os; os.environ['FOO'] = 'bar'"; echo ${FOO}
$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Substitute "other programs" with "other Python modules" and the point makes sense though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"other Python modules"
Oh wow, so it's not even global for everything running through the same Python interpreter? Crazy :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I meant Dan's point stands -- it will affect those
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've improved the change log entry. Feel free to merge if you're happy!
Tx @hoechenberger ! |
Sets
QT_MAC_WANTS_LAYER=1
for STC plots via PyVista / pyvistaqt.Was required on my system with macOS 11.2.1, Qt 5.12.9, pyqt 5.12.3 (installed from
conda-forge
)Previous fix via #8554 didn't cover STC plots.
cc @cbrnr, @GuillaumeFavelier