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
Prefering wheel-based installation over source-based installation #3785
Comments
I agree. Binary (wheel-based) installations mostly "just-work". Plus, they are the preferred format for packaging and publishing to PyPI (at least from pip's point-of-view). I think that making it the default would catalyse the adoption of wheels (not sure if it's needed though). Even in the long term, this seems to be a preferable. |
For completeness,
|
I want to bother @dstufft and @pfmoore for this one. Thanks for keeping the discussions going. Would you want to discuss this now or after the install-as-upgrade work is implemented? From what I understand about the current situation,
While all this is fine and expected, the issue is pip does not know whether a source installation fits one of these, or any other case I missed. Thus, source installations have to be treated differently from wheel installations. wheels are superior if it supports your platform. (Otherwise, it's only source builds. Those platforms won't be affected by this issue anyway) So, preferring them over source builds is indeed favourable. This is already the case for the selected (to-be-downloaded-and-installed) version. However, there are situations when the user might be okay with getting a slightly older version of a package as long as it's a wheel, to simplify their life. The proposed |
Just a drive-by comment here: I have been bitten several times by projects uploading a new release and the wheels do not come for a little while later. This leaves the new sdist in a state where it is the default for pip. This can cause the build to fail until the wheel is finally uploaded. Ideally |
@mmerickel I don't think it should be default. Anyone installing a package would expect the latest version to be installed, unless they do something to the defaults (like passing this flag). |
Is there any update on this issue? This would be a useful feature help us avoid errors with missing C/C++ compilers and save installation time. |
Hi @kendallc!
None yet. It's on my list but it's fairly low in it. |
This would be nice. I have a case where I need to pre-download all dependencies for a package for fully offline installation on a different architecture; I can't specify the other architecture without specifying |
Considering this case (pypa/wheel#215), I think pip can't make the decision on the client side only. Here is a plan for precedence logic of downloading format:
ref: pypi/warehouse#3106 |
The flag makes pip prefer an older but valid binary distributions over a newer source distributions. Fixes #3785.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This issue serves as a starting point for further discussion on this proposed
--prefer-binary
flag.The text was updated successfully, but these errors were encountered: