# raw.plot() causes segmentation fault

**URL:** <https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908>\
**Category:** Support & Discussions\
**Created:** [June 6, 2024, 10:26pm UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908 "2024-06-06T22:26:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoto55555](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/shoto55555/32/3715_2.png) [@shoto55555](https://mne.discourse.group/u/shoto55555)\
**Post date:** [June 6, 2024, 10:26pm UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/1 "2024-06-06T22:26:53Z")

</div>

- MNE version: 1.8.0
- operating system: Sonoma 14.5 (Apple M1)

I’m trying to do the MNE tutorial with Jupyterlab, but every time I ran ‘raw.plot()’, it terminates the mne kernel.

I would really like to use the MNE package for my research, so it would be very helpful if anyone could solve this issue.

Best regards,  
Shoto

The following is the system information.

Platform macOS-14.5-arm64-arm-64bit  
Python 3.9.1 (default, Aug 31 2023, 18:13:59) [Clang 14.0.3 (clang-1403.0.22.14.1)]  
Executable /Users/yamadashoto/.pyenv/versions/3.9.1/bin/python  
CPU arm (8 cores)  
Memory 16.0 GB

Core  
├☑ mne 1.8.0.dev60+ga307bbd5ea9 (devel, latest release is 1.7.0)  
├☑ numpy 1.22.4 (unknown linalg bindings (threadpoolctl module not found: No module named ‘threadpoolctl’))  
├☑ scipy 1.7.3  
└☑ matplotlib 3.8.2 (backend=module://matplotlib\_inline.backend\_inline)

Numerical (optional)  
├☑ nibabel 5.2.1  
├☑ pandas 2.0.3  
├☑ h5io 0.2.3  
├☑ h5py 3.10.0  
└☐ unavailable sklearn, numba, nilearn, dipy, openmeeg, cupy

Visualization (optional)  
├☑ pyvista 0.43.9 (OpenGL 4.1 Metal - 88.1 via Apple M1)  
├☑ pyvistaqt 0.11.0  
├☑ vtk 9.3.0  
├☑ qtpy 2.4.1 (PyQt5=5.15.11)  
├☑ ipywidgets 8.1.3  
└☐ unavailable ipympl, pyqtgraph, mne-qt-browser, trame\_client, trame\_server, trame\_vtk, trame\_vuetify

Ecosystem (optional)  
└☐ unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline, neo, eeglabio, edfio, mffpy, pybv

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [June 7, 2024, 6:24am UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/2 "2024-06-07T06:24:36Z")

</div>

Hello and welcome to the forum! This is likely due to an incompatibility between your Python binary and Qt. Please follow the installation instructions on our website, or use the stand-alone installer.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![shoto55555](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/shoto55555/32/3715_2.png) [@shoto55555](https://mne.discourse.group/u/shoto55555)\
**Post date:** [June 7, 2024, 7:33am UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/3 "2024-06-07T07:33:36Z")

</div>

Hello Richard!  
Thank you very much for your reply!

I actually tried the installer first, which terminated the kernel. I then created another kernel with the ‘pip’ method, which again terminated the new kernel in the same fashion…

Best wishes,  
Shoto

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [June 7, 2024, 8:34am UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/4 "2024-06-07T08:34:07Z")

</div>

Hello, can you try installing via the `conda` method please? That should work in any case…

---

<div class="post-metadata">

**Author:** ![shoto55555](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/shoto55555/32/3715_2.png) [@shoto55555](https://mne.discourse.group/u/shoto55555)\
**Post date:** [June 7, 2024, 11:22am UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/6 "2024-06-07T11:22:36Z")

</div>

Hello.

I tried the conda method, but the same problem continues…

```python
$ conda create --channel=conda-forge --strict-channel-priority --name=mne mne

$ conda install --name=base nb_conda_kernels

```

I first tried these, but the kernel for the new mne environment did not show up in jupyter notebook & jupyter lab.  
So I additionally ran the following code

```python
python -m ipykernel install --user --name mne_env

```

I’ve done things wrongly maybe…  
If you could spot it, it would be really helpful…

Thank you for your help.

Best wishes,  
Shoto

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [June 7, 2024, 1:09pm UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/7 "2024-06-07T13:09:07Z")

</div>

> [@shoto55555](#):
>
> ```python
> $ conda install --name=base nb_conda_kernels
> 
> ```

I think you need to install this into the `mne` environment, not into `base`

Or maybe you need `ipykernel` in `mne`? I’m not sure  
Why don’t you just install Jupyter Lab into the `mne` environment and start it from there?

---

<div class="post-metadata">

**Author:** ![shoto55555](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/shoto55555/32/3715_2.png) [@shoto55555](https://mne.discourse.group/u/shoto55555)\
**Post date:** [June 7, 2024, 2:31pm UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/8 "2024-06-07T14:31:02Z")

</div>

That was the cause of the crush apparently.

Once I adjusted the name accordingly like the following,  
everything worked out!

```python
$ conda install --name=mne nb_conda_kernels

```

`python -m ipykernel install --user --name mne`

Thank you very much for your help!

Best wishes,  
Shoto

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 14, 2024, 2:31pm UTC](https://mne.discourse.group/t/raw-plot-causes-segmentation-fault/8908/9 "2024-06-14T14:31:34Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
