← 返回首页
include nbformat as a plotly[express] dependency by afeld · Pull Request #5380 · plotly/plotly.py · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

include nbformat as a plotly[express] dependency#5380

Open
afeld wants to merge 1 commit into
plotly:mainfrom
afeld:patch-4
Open

include nbformat as a plotly[express] dependency#5380
afeld wants to merge 1 commit into
plotly:mainfrom
afeld:patch-4

Conversation

Copy link
Copy Markdown
Contributor

afeld commented Oct 16, 2025
edited
Loading

Required for MimeType rendering. Closes #4512.

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the code generator and not the generated files.
  • I have added tests or modified existing tests.
  • For a new feature, I have added documentation examples (please see the doc checklist as well).
  • I have added a CHANGELOG entry if changing anything substantial.
  • For a new feature or a change in behavior, I have updated the relevant docstrings in the code.

gvwilson requested a review from marthacryan October 28, 2025 11:45
gvwilson added P2 considered for next cycle community community contribution fix fixes something broken dependencies Pull requests that update a dependency file labels Oct 28, 2025
Required for MimeType rendering.
Copy link
Copy Markdown
Contributor Author

afeld commented Oct 28, 2025
edited
Loading

Hmm, the remaining build error doesn't sense to me… Doesn't seem to be happening on main, but at a glance, I don't get why this change would have caused it. Any suggestions?

Copy link
Copy Markdown
Contributor

emilykl commented Nov 17, 2025

@afeld AFAIK nbformat is only required when working with Jupyter notebooks, is there a scenario you've encountered where you require nbformat when working outside Jupyter?

In general we try to keep Plotly Express dependencies pretty minimal and only require packages which are needed in all scenarios.

Would be open to maybe adding a [jupyter] extra or something along those lines though.

Copy link
Copy Markdown
Contributor Author

afeld commented Nov 18, 2025

nbformat is only required when working with Jupyter notebooks …

Sure. Do you have a sense of how many Plotly Express users are doing so in Jupyter vs. not?

is there a scenario you've encountered where you require nbformat when working outside Jupyter?

No, I exclusively(?) use Plotly with Jupyter, with build tools like nbconvert and Jupyter Book.

In general we try to keep Plotly Express dependencies pretty minimal and only require packages which are needed in all scenarios.

The impression I got was that plotly contains the bare minimum, while plotly[express] was the "batteries included" / "give me what I need to make charts quickly" option. (Re-reading the Getting Started, realizing that is not what it says.)

Would be open to maybe adding a [jupyter] extra or something along those lines though.

That makes sense to me!

pip install plotly[express,jupyter]

would still be easy for users. I'll update.

This 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution dependencies Pull requests that update a dependency file fix fixes something broken P2 considered for next cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError: Mime type rendering requires nbformat>=4.2.0 but it is not installed

4 participants

Footer

© 2026 GitHub, Inc.