-
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
Preserve pip.main() in some fashion #5080
Comments
pip.main()
in some fashion
I wouldn't have any objection to reintroducing If someone were to create a PR for this, I think it would be a good thing to consider - but it would be something that needs discussion, and that's likely easier to do in the context of a proposed implementation, not just in the abstract. |
This change causes the following docker lines to fail: docker run -it ubuntu
apt update && apt install -y python-pip
pip install pip==10.0b1
pip Now pip (the command) is broken, since the pip script in |
And, unrelated to my last post but related to this discussion, it's quite common for Jupyter notebooks (at least in the sciences) to check for a requirement, then install any missing requirements using |
That script is presumably managed by the OS Regarding Jupyter notebooks, which don't have access to a command prompt, we're aware that they have a specific problem. I'd suggest that using |
#5149 is the PR for this. |
Previously, we used internal pip code, which was changing in point releases, causing issues. We actually don't need pip to do this, we can instead ask the installed python's pkg_resources directly for the same info. Related issues: pypa/pip#5079 pypa/pip#5080 pypa/pip#5081
The decision on this appears to be "no", judging from the thread in #5149. I did toss something together which I'll shamelessly link here, in case people find it useful (or objectionable and want to yell at me): |
Indeed. |
Resolves #205 - pypi.python.org shutting down * Updated the default fallback URL to `pypi.org/simple` rather than `pypi.python.org/simple` * Scrubbed references and links to `pypi.python.org` * Fixed tests breaking due to the removal of `pip.main()` in pip 10.0 - see pypa/pip#5080 for more info
This is so sad :'( Why do you people do this? |
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. |
I'm opening this issue on the recommendation of @dstufft to carry over a tangential discussion that arose in #5079.
While understanding that
pip.main()
is not officially supported and is being refactored topip._internal.main()
in the10.0.0
release, there is definitely usage of it out there. GitHub code search won't allow for using.
so this search isn't perfect:https://github.com/search?l=Python&q=import+pip+main%28&type=Code&utf8=%E2%9C%93
but it returns ~850k hits of
import pip
+main(
on public github projects.An anecdotal pattern I notice from a quick look through them, is that many are installing data packages. Not surprising since there are many data environments (notebook deployments especially) that obfuscate access to the host environment. This is serving as an in-python way of managing dependencies that can be shared in such contexts.
I'm not sure if there's any interest in maintaining the
pip.main()
as a passthrough command execution wrapper, but that could potentially mitigate the pain of upgrading for many.The text was updated successfully, but these errors were encountered: