1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-06 21:32:37 +01:00

Merge pull request #477 from setrofim/master

utils/ipython: handle nbconvert import
This commit is contained in:
setrofim
2017-09-14 08:37:52 +01:00
committed by GitHub

View File

@@ -37,6 +37,7 @@ NBFORMAT_VERSION = 3
if IPython:
if LooseVersion('6.0.0') > LooseVersion(IPython.__version__) >= LooseVersion('4.0.0'):
try:
import nbformat
from jupyter_client.manager import KernelManager
@@ -50,6 +51,8 @@ if IPython:
IPYTHON_NBCONVERT_HTML = ['jupyter', 'nbconvert', '--to html']
IPYTHON_NBCONVERT_PDF = ['jupyter', 'nbconvert', '--to pdf']
except ImportError:
import_error_str = 'Please install "jupyter" as well as "ipython" packages.'
elif LooseVersion('4.0.0') > LooseVersion(IPython.__version__) >= LooseVersion('3.0.0'):
from IPython.kernel import KernelManager