nipy / niwidgets

Neuroimaging widgets for jupyter notebooks
http://www.nipy.org/niwidgets
Other
84 stars 34 forks source link

Pypi version of niwidgets broken #32

Closed lrq3000 closed 6 years ago

lrq3000 commented 6 years ago

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

lrq3000 commented 6 years ago

Python 2 incompatibility, fixed by PR #33.