Skip to content
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

[Feature request] Error handling when building/installing #12654

Closed
Bardo-Konrad opened this issue Apr 26, 2024 · 4 comments
Closed

[Feature request] Error handling when building/installing #12654

Bardo-Konrad opened this issue Apr 26, 2024 · 4 comments

Comments

@Bardo-Konrad
Copy link

Bardo-Konrad commented Apr 26, 2024

What's the problem this feature will solve?

Error handling when building/installing

Describe the solution you'd like

pip install -r requirements.txt or pip install module should not end with
note: This error originates from a subprocess, and is likely not a problem with pip. or error C2039 and the like. You enter the command and if there are problems with libraries, pip installs those libraries and tries again recursively also addresses error messages of external builders like cl.exe.

In short, you run the pip command and it just installs.

@Bardo-Konrad Bardo-Konrad added the type: feature request Request for a new feature label Apr 26, 2024
@notatallshaw
Copy link
Contributor

notatallshaw commented Apr 26, 2024

I'm confused by your proposed solution/outcome, if you don't have the external dependencies to build a package, e.g. a database library, or a language compiler, how is pip supposed to handle this?

@Bardo-Konrad
Copy link
Author

Bardo-Konrad commented Apr 26, 2024

By installing those external dependencies for you to then retry.
There's not so many options of external builders: cl.exe cmake.exe vcpkg.exe.
As pip is running those, it should supervise.
A first start would be a condensed output, not those 10000 lines with one maybe useful info.

@notatallshaw
Copy link
Contributor

Pip is a Python package installer and only understands Python packages and their metadata, as defined by the relevant Python packaging standards.

Currently there is no way to for a Python package to express it's external dependencies or how to install them, you would need to discuss this at https://discuss.python.org/c/packaging/14. Pip maintainers are likely going to need a standard to be agreed and approved before considering such a feature.

There is, however, already an ecosystem for Python libraries that installs external dependencies for you, and it's called conda. It is available as a commercial solution under the name "Anaconda" and "miniconda", or open source solutions "conda-forge", "miniforge", and "mamba", there is recently a tool that tries to seamlessly integrate it with with traditional python packages called "pixi".

@ichard26
Copy link
Member

ichard26 commented May 5, 2024

Pip is an user-land application and won't be installing system-level or OS packages for you. It also doesn't control the build process as that's delegated to the package's configured build backend (see PEP 517). While installing extension packages from source is definitely subject to a less than ideal experience, as @notatallshaw has explained, this is an ecosystem limitation that will require standardised solutions.

I'll close this as it's not actionable as-is.

@ichard26 ichard26 closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
@ichard26 ichard26 added resolution: out of scope and removed S: needs triage Issues/PRs that need to be triaged labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants