diff --git a/.travis.yml b/.travis.yml index dd6961b..2841e7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_install: - conda config --set always_yes yes - conda update conda - conda info -a - - travis_retry conda create -n test $CONDA IPython pip nose pyzmq jsonschema + - travis_retry conda create -n test $CONDA IPython pip nose pyzmq jsonschema nbformat - source activate test - travis_retry pip install coveralls diff --git a/pymatbridge/publish.py b/pymatbridge/publish.py index f6d97d7..213d3cb 100644 --- a/pymatbridge/publish.py +++ b/pymatbridge/publish.py @@ -1,5 +1,10 @@ -import IPython.nbformat.v4 as nbformat -from IPython.nbformat import write as nbwrite +try: + import nbformat.v4 as nbformat + from nbformat import write as nbwrite +except ImportError: + import IPython.nbformat.v4 as nbformat + from IPython.nbformat import write as nbwrite + import numpy as np