Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions plotly/io/_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,10 @@ def show(fig, renderer=None, validate=True, **kwargs):
elif ipython and ipython.get_ipython():
# Try to detect environment so that we can enable a useful
# default renderer
if not default_renderer:
try:
import google.colab # noqa: F401

default_renderer = "colab"
except ImportError:
pass
# Check if we're running in a Colab web notebook
if not default_renderer and "COLAB_NOTEBOOK_ID" in os.environ:
default_renderer = "colab"

# Check if we're running in a Kaggle notebook
if not default_renderer and os.path.exists("/kaggle/input"):
Expand Down