-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Don't require pyarrow on 3.9, and show a warning on custom components #2452
Conversation
Regarding this comment:
This bit me too with some packages I maintain. The new Mac architecture can use packages for the old Mac architecture, but pip needed some changes to realize that, so it only works with pip 20.3 or higher. See this issue for more details. Pip 20.3 was released Dec 1, so after the comment you quoted. So if someone on 3.8 or lower on the new Mac has issues you can probably just tell them to upgrade pip. |
Curious did you give the My concerns with the current approach is mainly regarding the release and distribution process. Concerns are easily testable but would want to confirm if we have a 3.9 version on pypi, would pip install be smart enough to get the right wheel for each environment. For releases, should we test both wheels? May have to modify our release scripts to ensure the right wheel is installed for each testing, etc. |
I have not -- the problem with I guess we could change our guides to recommend
Yeah, this is my primary concern too. I don't think we want to maintain multiple wheels long-term, this is really just a workaround for the pyarrow 3.9 thing, and we should take it out as soon as pyarrow provides wheels for 3.9. Until then, though, I think the added maintenance burden would be worth making the |
From my understanding, the setuptools code is what creates our wheel so if you pass I think the issue with your first attempt was that you were evaluating the conditional requirements on compile time whereas adding the conditional requirement as a parameter to the setuptools command will pass the conditional requirement to evaluate on install time. |
Did a very not thorough test for |
Note for posterity: Karrie was absolutely right and I was wrong above; |
|
||
And if you're using Streamlit Sharing, add "pyarrow" to your requirements.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.
probably not worth it but just noting this down, it looks all custom components will not work regardless or not if the component uses tables.
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 point. The alternate approach would be to try-except specifically the areas that call on arrow_table, or to move this try-catch into arrow_table.py
altogether.
In my head, cutting the boundary at "Custom Components" rather than "Custom Components using tables" was easier for users to reason about, and I imagine those who run into this issue (those inclined to install components) are technical enough not to have a huge problem with this, plus AFAICT components are not that widely, so I didn't feel like optimizing this further.
Incidentally, would be nice to have easy metrics on "What % of Streamlit Apps use Components" and "What % of Streamlit Apps are on Python 3.9".
Co-authored-by: karrie <[email protected]>
PyArrow. Unfortunately, PyArrow does not yet support Python 3.9. | ||
|
||
You can either switch to Python 3.8 with an environment manager like PyEnv, or | ||
[install Streamlit with conda](https://discuss.streamlit.io/t/note-installation-issues-with-python-3-9-and-streamlit/6946/7): |
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.
@akrolsmir : I'm a little confused by reading this line. Are we telling the user to
- install Python 3.8 (and streamlit) using conda as en environment manager
OR - are we saying that by using conda the user can use Python 3.9 and PyArrow
Can we make the distinction clear in the comment?
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.
install Python 3.8 (and streamlit) using any environment manager or use conda
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.
Cool, LGTM 👍
LGTM 👍 |
* develop: Extract st.container, columns, container out of delta_generator.py (streamlit#2487) Remove the unused variables inside protos (streamlit#2486) Stop running cypress-flaky-approval for each PR (streamlit#2490) Dynamically import git, and fail gracefully if missing (streamlit#2482) Bump React to 17.0.1 (streamlit#2453) Fix emojis (streamlit#2480) Add missing copyright headers (streamlit#2478) Stop requiring watchdog when installing Streamlit on Macs (streamlit#2470) Minor tweak to PyArrow warning message (streamlit#2472) Use a set literal (streamlit#2476) Add type annotations to DeltaGenerator mixins (streamlit#2475) Update change log Up version to 0.73.0 Don't require pyarrow on 3.9, and show a warning on custom components (streamlit#2452)
Fixes #2356 #2001
Current Approach (12/16):
Tested locally on 3.9 and 3.8, verified components still work on 3.8.
Get the wheel file: https://share.streamlit.io/streamlit/core-previews/pr-2452
.
.
.
.
.
Old Proposal (12/14):
Notes (12/11):
setup.py
file thinking it would get run on eachpip install
, but actually it only gets run when we package the wheel file.setup.py
, but rather has a hardcoded list of dependencies for pip to install (you can unzip the whl and look under streamlit-0.72.0.dist-info/METADATA). So the dependencies are locked in by the time we upload the wheel file; and when userspip install streamlit
, there's no code that we control that decides which requirements to install.pip install
does not install from an uploaded wheel, but rather a source folder includingsetup.py
?)Notes (12/10):
From @tvst:
A temporary patch for the PyArrow thing could look like this:
This PR is still completely untested; waiting for PR Preview to make a wheelfile.Wheelfile hereIf true, we'd want to change up our setup.py to try and detect Mac OS 11???