try except for import IPython, optional dependency