Skip to content
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

mne not recognising mne-qt-browser version for epochs instance #165

Closed
emmaducos opened this issue May 17, 2023 · 4 comments
Closed

mne not recognising mne-qt-browser version for epochs instance #165

emmaducos opened this issue May 17, 2023 · 4 comments

Comments

@emmaducos
Copy link

Describe the bug

I created a conda environment, installed the full version of MNE (via conda & mamba), and installed ipympl for interactive views.
raw.plot(block=True) worked by itself with the mne-qt-browser feature, but when I wanted the same for the epoch instance (of the same raw data) with the command epochs.plot(block=True), it switched to matplotlib backend.
I then tried with this command: mne.viz.plot_epochs(epochs) and got the following message :
'You set the browser-backend to "qt" but your current version 0.0.0 of mne-qt-browser is too low for Epochs.Update with pip or conda.Defaults to matplotlib.
Using matplotlib as 2D backend.'

when looking at my conda environment, I have mne-qt-browser 0.5.0 installed, but it did not appear in mne.sys_info().
also, when I try to install mne-qt-browser via conda, I get the message that the requirement is already satisfied. (and I can see in the environment list of packages that mne-qt-browser is installed with version 0.5.0)
it seems that for my epoch instance mne does not recognize mne-qt-browser version, eventhough it works for the raw instance.

Steps to reproduce

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = (
    sample_data_folder / "MEG" / "sample" / "sample_audvis_filt-0-40_raw.fif"
)
raw = mne.io.read_raw_fif(sample_data_raw_file)
event_dict = {
    "auditory/left": 1,
    "auditory/right": 2,
    "visual/left": 3,
    "visual/right": 4,
    "smiley": 5,
    "buttonpress": 32,
}
events = mne.find_events(raw, stim_channel="STI 014")
epochs = mne.Epochs(
    raw,
    events,
    event_id=event_dict,
    tmin=-0.2,
    tmax=0.5,
    preload=True,
)
epochs.plot(block=True)

Expected results

visualization of epoch instance with mne-qt-browser

Actual results☺

'You set the browser-backend to "qt" but your current version 0.0.0 of mne-qt-browser is too low for Epochs.Update with pip or conda.Defaults to matplotlib.
Using matplotlib as 2D backend.'
and then a working plot with matplotlib backend.

Additional information

I'm working on VS code in interactive mode with WSL2 on windows 11
Platform Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:58:44) [GCC 11.3.0]
Executable /home/educos/miniconda3/envs/rxpaud/bin/python
CPU x86_64 (20 cores)
Memory 15.5 GB

Core
├☑ mne 1.4.0
├☑ numpy 1.23.5 (OpenBLAS 0.3.21 with 20 threads)
├☑ scipy 1.10.1
├☑ matplotlib 3.7.1 (backend=module://ipympl.backend_nbagg)
├☑ pooch 1.7.0
└☑ jinja2 3.1.2

Numerical (optional)
├☑ sklearn 1.2.2
├☑ numba 0.56.4
├☑ nibabel 5.1.0
├☑ nilearn 0.10.1
├☑ dipy 1.7.0
├☑ openmeeg 2.5.6
├☑ pandas 2.0.1
└☐ unavailable cupy

Visualization (optional)
├☑ pyvista 0.39.0 (OpenGL 4.1 (Core Profile) Mesa 22.2.5 via D3D12 (Intel(R) UHD Graphics))
├☑ pyvistaqt 0.0.0
├☑ ipyvtklink 0.2.2
├☑ vtk 9.2.6
├☑ qtpy 2.3.1 (PyQt5=5.15.6)
├☑ ipympl 0.9.3
├☑ pyqtgraph 0.13.3
└☑ mne-qt-browser 0.0.0

Ecosystem (optional)
└☐ unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline

@larsoner
Copy link
Member

Argh probably an issue with the mne-qt-browser feedstock. I'll take a look

@larsoner
Copy link
Member

Should be fixed by conda-forge/mne-qt-browser-feedstock#24, if you do mamba install mne-qt-browser in an hour or so it should fix the problem

@emmaducos
Copy link
Author

I had to reinstall the full mne package into a new conda environment, and now it works !
(just reinstalling mne-qt-browser did not update the package since for conda, it was already the latest version).
Thank you for responding this quickly !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants