Skip to content

Commit e3a3266

Browse files
authored
tried to fix default renderer for ipython terminal (#2255)
* tried to fix default renderer for ipython terminal * refactoring
1 parent 587075c commit e3a3266

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: packages/python/plotly/plotly/io/_renderers.py

+6
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,12 @@ def show(fig, renderer=None, validate=True, **kwargs):
497497
# orca not found
498498
pass
499499

500+
# Check if we're running in ipython terminal
501+
if not default_renderer and (
502+
ipython.get_ipython().__class__.__name__ == "TerminalInteractiveShell"
503+
):
504+
default_renderer = "browser"
505+
500506
# Fallback to renderer combination that will work automatically
501507
# in the classic notebook (offline), jupyterlab, nteract, vscode, and
502508
# nbconvert HTML export.

0 commit comments

Comments
 (0)