We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 37f7df6 + fee873c commit 681bfd0Copy full SHA for 681bfd0
lib/matplotlib/backends/backend_nbagg.py
@@ -14,7 +14,12 @@
14
import tornado.ioloop
15
16
from IPython.display import display, Javascript, HTML
17
-from IPython.kernel.comm import Comm
+try:
18
+ # Jupyter/IPython 4.x or later
19
+ from ipykernel.comm import Comm
20
+except ImportError:
21
+ # Jupyter/IPython 3.x or earlier
22
+ from IPython.kernel.comm import Comm
23
24
from matplotlib import rcParams
25
from matplotlib.figure import Figure
0 commit comments