# interactive issue on windows

**URL:** <https://mne.discourse.group/t/interactive-issue-on-windows/1358>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [November 8, 2017, 1:31pm UTC](https://mne.discourse.group/t/interactive-issue-on-windows/1358 "2017-11-08T13:31:51Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [November 8, 2017, 1:31pm UTC](https://mne.discourse.group/t/interactive-issue-on-windows/1358/1 "2017-11-08T13:31:51Z")

</div>

Dear list,

I have a code that works perfectly on Linux but creates issues on  
Windows?, where I loose interactivity.

here is (the relevant part of) the incriminated code:

[...]

??? epochs\_eog =  
mne.preprocessing.create\_eog\_epochs(raw,ch\_name='EOGV',baseline=(-.5,-.2),reject=None)

??? epochs\_eog.plot()  
??? #print("Checking EOG detection...")

??? if float(sys.version[0]) \< 3:  
??? x = raw\_input("press Enter to continue: ")  
??? else:  
??? x = input("press Enter to continue: ")

??? print("Computing the EOG projector...")  
??? # estimating the eog projector on pure EOG  
??? projs = mne.compute\_proj\_epochs(epochs\_eog, n\_eeg=1, \  
??? n\_grad=0, n\_mag=0, desc\_prefix=None)

??? print("Plotting the EOG projector…")  
??? # plotting the eog projector  
??? # to get the EEG layout  
??? lt = mne.channels.find\_layout(raw.info)  
??? mne.viz.plot\_projs\_topomap(projs,layout=lt)  
??? if float(sys.version[0]) \< 3:  
??? x = raw\_input("Accept? [Y/N]: ")  
??? else:  
??? x = input("Accept? [Y/N]: ")  
[…]

Basically,? it's estimating blinks artifact epochs and show them. Then  
the user can visualize the blinks and reject the epochs that are not  
blinks (or noisy ones etc...). Once this is finished, by closing the  
window that showed the epochs, the user is facing a prompt in Ipython  
(with a test of python version currently being ran), and after pressing  
"Enter", one computes the projector and shows its topography. The user  
can then decide to accept the projector or not and the scripts goes on.

When running this script in Ipython, it runs smoothly on my linux  
machine. But on Windows? (tested on two different machine, and two  
different versions), the behavior is not the intended one: when the  
blink epochs are shown, the window is "not responding" and the user  
cannot interact with it (hence can not reject the non-blink epochs). The  
windows becomes interactive back once the "Enter" key is pressed at the  
ipython prompt. But then, obviously, the scripts keeps on running and  
computed the projector on all epochs, including the non cleaned ones...

Has anyone experience a similar issue? Is it a Ipython issue? Is it  
blocking matplotlib figures from being interactive by default? Should we  
run with some specific options (and if so, how can this be done on  
Windows??).

??? Thanks a lot in advance for your help !!

??? ??? Boris

---

<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:** [November 8, 2017, 1:49pm UTC](https://mne.discourse.group/t/interactive-issue-on-windows/1358/2 "2017-11-08T13:49:52Z")

</div>

Hi Boris!

Have you tried enabling interactive matplotlib mode with

%matplotlib

?

Clemens

---

<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:** [November 8, 2017, 2:04pm UTC](https://mne.discourse.group/t/interactive-issue-on-windows/1358/3 "2017-11-08T14:04:30Z")

</div>

Thanks Clemens for the quick response

Le 08/11/2017 ? 14:49, Brunner, Clemens (clemens.brunner at uni-graz.at) a  
?crit?:

> Hi Boris!
> 
> Have you tried enabling interactive matplotlib mode with
> 
> %matplotlib
> 
> ?
> 
> Clemens

Unfortunately, it does not solve the problem: windows are still not  
responding until the end of the script...

??? B.

---

<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:** [November 8, 2017, 2:27pm UTC](https://mne.discourse.group/t/interactive-issue-on-windows/1358/4 "2017-11-08T14:27:30Z")

</div>

what matplotlib backend are you using? how did you install it?

Best,  
Alex
