mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Merge pull request #477 from setrofim/master
utils/ipython: handle nbconvert import
This commit is contained in:
commit
adf13feb81
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user