nipy/niwidgets

Pypi version of niwidgets broken

lrq3000 opened this issue · 1 comments

Hey there,

I installed niwidgets from pypi and when doing this:

from niwidgets import NiftiWidget

I get the following error:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-580c792c4ebb> in <module>()
      8 from nilearn import image
      9 from nilearn import plotting
---> 10 from niwidgets import NiftiWidget
     11 
     12 try:

C:\Anaconda2\lib\site-packages\niwidgets\__init__.py in <module>()
      6 """
      7 # import example data
----> 8 from .exampledata import exampleatlas, examplezmap, examplet1  # noqa
      9 # import widget classes.
     10 from .niwidget_volume import NiftiWidget  # noqa

C:\Anaconda2\lib\site-packages\niwidgets\exampledata.py in <module>()
      4     # on >3 this ships by default
      5     from pathlib import Path
----> 6 except ModuleNotFoundError:
      7     # on 2.7 this should work
      8     try:

NameError: name 'ModuleNotFoundError' is not defined

I am using Python v2.7 BTW

Python 2 incompatibility, fixed by PR #33.