Set the 'colab' renderer only for Colab web notebooks by kevineger · Pull Request #5473 · plotly/plotly.py
The current implementation detects if the `google.colab` module is available. This has a couple problems: 1. Anyone can install that library, outside of Colab. 2. The recently launched [Colab VS Code extension](https://marketplace.visualstudio.com/items?itemName=Google.colab) does not work with that web-based renderer. Snapping to the conventions used for the other notebooks/renderers (e.g. Kaggle, Azure), this change now looks for the presence of the `COLAB_NOTEBOOK_ID` environment variable. I'm an engineer on Colab and have verified that we set this on kernel init for all notebooks accessed through our web app (https://colab.research.google.com/). More context in plotly#5471.
This was referenced
Jan 21, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters