mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
add a version check along with check if matplotlib is installed
This commit is contained in:
parent
780f0ebb43
commit
da26f5613d
1 changed files with 5 additions and 0 deletions
|
|
@ -120,6 +120,11 @@ class PyZeppelinContext(dict):
|
|||
# If we don't have matplotlib installed don't bother continuing
|
||||
try:
|
||||
import matplotlib
|
||||
|
||||
#matplotlib.rcParams['savefig.format'] is only avail in version 1.2.0 and above
|
||||
from distutils.version import LooseVersion
|
||||
if LooseVersion("1.2.0") >= LooseVersion(matplotlib.__version__):
|
||||
return
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue