diff --git a/.travis.yml b/.travis.yml index f9c5944..72a4326 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,11 @@ before_install: - conda info -a - travis_retry conda create -n test $CONDA IPython pip nose pyzmq jsonschema - source activate test + - if [[ $CONDA == python=3.3* ]]; then + pip install nbformat; + else + travis_retry conda install nbformat; + fi - travis_retry pip install coveralls install: 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