Closed Carreau closed 9 years ago
Yuck. We probably need a migration helper for other nbextension installers, including @jdfreder's jupyter-pip.
I kind of imagine it will be simpler for most other project. The problem is I am running with python3 -We
so I cannot use the shims. Most other extensions can "just" import from IPython.xxx
and the shim take care of that. It's just a good exercise to see how hard it is to support both.
Why is this not
try:
from jupyter_notebook import nbextensions
except ImportError:
from IPython.html import nbextensions
?
Because only the try except was what I had first, but then it fails if you also have a IPython ~ 3 install at the same time.
getting wether we are on IPython 3.x or Jupyter_notebook 4.x is tricky as the 2 can be installed as the same time.
try-import
andin sys.modules
alone are not sufficient.