Skip to content

Commit fcec32f

Browse files
authored
Merge pull request #654 from ccordoba12/fix-matplotlib-inline
Import configure_inline_support from matplotlib_inline if available
2 parents f1347e7 + f62c76a commit fcec32f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- name: Install the Python dependencies
4040
run: |
4141
pip install --pre --upgrade --upgrade-strategy=eager .[test] codecov
42+
pip install jupyter_client==6.1.*
4243
- name: Install matplotlib
4344
if: ${{ matrix.os != 'macos' && matrix.python-version != 'pypy3' }}
4445
run: |

ipykernel/zmqshell.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@ def init_magics(self):
600600
def enable_matplotlib(self, gui=None):
601601
gui, backend = super(ZMQInteractiveShell, self).enable_matplotlib(gui)
602602

603-
from ipykernel.pylab.backend_inline import configure_inline_support
603+
try:
604+
from matplotlib_inline.backend_inline import configure_inline_support
605+
except ImportError:
606+
from ipykernel.pylab.backend_inline import configure_inline_support
604607

605608
configure_inline_support(self, backend)
606609

0 commit comments

Comments
 (0)