# Python 3 support?

**URL:** <https://mne.discourse.group/t/python-3-support/637>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [November 28, 2013, 2:35pm UTC](https://mne.discourse.group/t/python-3-support/637 "2013-11-28T14:35:15Z")\
**Posts on this page:** 5\
**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 28, 2013, 2:35pm UTC](https://mne.discourse.group/t/python-3-support/637/1 "2013-11-28T14:35:15Z")

</div>

Hi.

I found out about MNE recently after becoming fed up of the headache of  
Matlab for EEG/MEG work (I'm a long term Python user). I've read up about  
it in the recent NeuroImage paper, and am impressed with the number of  
features and like the philosophy!

Sorry if this has been raised before (couldn't find an issue for it on the  
Github), but is there plans for Python 3 support? The rest of my python  
analysis code is now in Py3, since the majority of major scientific  
libraries now support it (numpy, scipy, matplotlib, pandas, scikit-learn  
etc.), and sometime in the future it would be good to not have to go back  
and forth between Py2/3.

I can help out with porting if there is no major changes required, and  
people are interested in maintaining a separate branch.

Nick  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20131128/2f708c45/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20131128/2f708c45/attachment.html)

---

<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 28, 2013, 3:51pm UTC](https://mne.discourse.group/t/python-3-support/637/2 "2013-11-28T15:51:43Z")

</div>

hi Nick,

> I found out about MNE recently after becoming fed up of the headache of  
> Matlab for EEG/MEG work (I'm a long term Python user). I've read up about it  
> in the recent NeuroImage paper, and am impressed with the number of features  
> and like the philosophy!

that's great to hear !

> Sorry if this has been raised before (couldn't find an issue for it on the  
> Github), but is there plans for Python 3 support? The rest of my python  
> analysis code is now in Py3, since the majority of major scientific  
> libraries now support it (numpy, scipy, matplotlib, pandas, scikit-learn  
> etc.), and sometime in the future it would be good to not have to go back  
> and forth between Py2/3.

it would be great to port it to Python 3. It has not been done yet  
because nobody asked for it. The core devs still use 2.7.

If you could start to take a stab at it and send us a pull request, it  
would be break.

we'll enable python 3 on travis for continuous integration.

the only (thankully weak) dependency that will not work is Mayavi.

See you on github

Best,  
Alex

---

<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 28, 2013, 4:19pm UTC](https://mne.discourse.group/t/python-3-support/637/3 "2013-11-28T16:19:11Z")

</div>

Hi Nick,

thanks for your feedback, this is nice to hear!  
Your request is very timely. Indeed, we were thinking about a Python 3  
port as one of the potential goals / milestones for the next release  
cycle.  
As Alex mentioned, Mayavi2 which we use as 3D visualization backend is  
a blocker to Python 3 support. This is because, most probably, it will  
never be ported to Python 3. However, I'm confident a solution can be  
found to this.

Looking forward to discussing details on Github,

Denis

---

<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 28, 2013, 4:24pm UTC](https://mne.discourse.group/t/python-3-support/637/4 "2013-11-28T16:24:57Z")

</div>

I have had great success with pyqtgraph to do interactive 2/3D  
visualizations, and it's pure-Python both v. 2 & 3. However, the 3D support  
is mainly a nice layer over OpenGL, not the extensively structured pipeline  
that's in VTK. Nevertheless, this has worked well for visualizing the  
cortical surface and M/EEG forward solutions that we generate in TVB (and  
will soon analyze in MNE!) and could share the code if interested.  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20131128/46b3abdc/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20131128/46b3abdc/attachment.html)

---

<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 28, 2013, 4:35pm UTC](https://mne.discourse.group/t/python-3-support/637/5 "2013-11-28T16:35:55Z")

</div>

Let's resume this discussion on Github, I've created an issue for this.

[https://github.com/mne-tools/mne-python/issues/944](https://github.com/mne-tools/mne-python/issues/944)

Cheers,  
Denis
