-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional download requirements for dev and plotly express #4644
base: master
Are you sure you want to change the base?
Conversation
We can plausibly drop the note about graph objects but basically I want some sort of explanation of why |
We shouldn't recommend If we want to have a one-liner "install everything" command that should be a change made inside Plotly.py. |
I was thinking of adding:
as an option which goes with usual pip patterns for optional dependencies. If we went that route I would expect that we drop support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed from the PR title that this was going to improve the install-time or runtime error messages for "you need Pandas" but there seem to be other changes as well? I trust you...
👍 on breaking the PR - thank you |
IMO the naming should be I'm in favor of this change, but let's not merge it right away. This PR changes a number of lines in |
83fb8c8
to
e2bcd8b
Compare
@gvwilson on further thought I think it makes sense to keep these changes in one PR. The text in the warning message is directly related to the installation recommendations that are also added in this PR -- I've updated the title & description to make the primary change more clear. |
👍 |
Co-authored-by: Alex Johnson <[email protected]>
@emilykl is this PR good to go with the latest changes? |
See also #4790 |
@ndrezn So is |
@marthacryan |
Oh interesting. What is the benefit here over just using |
The benefit is we recommend a specific version number for compatibility. I don't think we have issues with different versions of Pandas but this makes it easy to pin a version of Pandas for use with Plotly if we ever encounter issues. In fact we're doing that here, where we install the latest pandas for new versions of Python but force older pandas for older Python. People in the original issue were having funky errors caused by this incompatibility: #2279 (comment) |
Oh ok that makes sense! Maybe for documenting the usage of that we could make that more clear? |
contributing.md
Outdated
@@ -138,17 +138,17 @@ We will support Python 3.12 and higher versions soon. | |||
|
|||
### Install requirements - (Non-Windows) | |||
```bash | |||
(plotly_dev) $ pip install -r packages/python/plotly/requirements.txt | |||
(plotly_dev) $ pip install -r packages/python/plotly/optional-requirements.txt | |||
(plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this step required in contributing.md? I think it's covered by the editable install of plotly
further down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch @LiamConnors , I'll remove this
(I verified that the setup instructions still work without this step, at least on Mac)
Looks good to me. Could you add a changelog entry for it too. |
Closes #2279
This PR:
plotly[express]
, explained in more detail belowrequirements.txt
torequires-install.txt
optional-requirements.txt
torequires-optional.txt
requires-express.txt
, which contains the dependencies required by Plotly Express which are not required by the base Plotly package (currently, this is justnumpy
)requires-optional.txt
, removing outdated dependencies which are definitely not needed anymoreThis PR adds the ability to install Plotly with:
which bundles
numpy
in the install, which is required byplotly.express
,This also revises the error message raised when using
plotly.express
ifnumpy
is not installed, providing further instructions on how to install.Open to ideas on better wording.