Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c11289

Browse files
authored
Merge pull request #19614 from meeseeksmachine/auto-backport-of-pr-19597-on-v3.4.x
Backport PR #19597 on branch v3.4.x (Fix IPython import issue)
2 parents 0e4cb23 + a0b2949 commit 3c11289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ def _fix_ipython_backend2gui(cls):
17431743
# `ipython --auto`). This cannot be done at import time due to
17441744
# ordering issues, so we do it when creating a canvas, and should only
17451745
# be done once per class (hence the `lru_cache(1)`).
1746-
if "IPython" not in sys.modules:
1746+
if sys.modules.get("IPython") is None:
17471747
return
17481748
import IPython
17491749
ip = IPython.get_ipython()

0 commit comments

Comments
 (0)