pip does not reinstall an already installed package from a different direct url requirement
See original GitHub issueWhat’s the problem this feature will solve?
Assume packaging
has been installed with pip install "packaging @ git+https://github.com/pypa/packaging@20.0"
.
Then try to install from the 20.1 tag: pip install "packaging @ git+https://github.com/pypa/packaging@20.1"
. The second install does nothing, saying the requirement is already satisfied.
Describe the solution you’d like
The second install should reinstall with the requested requirement.
Alternative Solutions
- Document this as a limitation of direct URL references support in PIP.
Additional context
This requires PEP 610 to implement. This may or may not influence the ongoing reflection about the resolver.
Issue Analytics
- State:
- Created 4 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Install a Python package into a different directory using pip?
Installs ALL packages including dependencies under /myfolder. Does not take into account that dependent packages are already installed elsewhere in Python.
Read more >pip install - pip documentation v22.3.1
Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed...
Read more >Installing Packages - Python Packaging User Guide - Python.org
The most common usage of pip is to install from the Python Package Index using a requirement specifier. Generally speaking, a requirement specifier...
Read more >How to use pip (Install, update, uninstall packages) - nkmk note
The pip itself is also managed by pip. If pip is not the latest version, the following message will be displayed when running...
Read more >Using Python's pip to Manage Your Projects' Dependencies
So, what exactly does pip do? pip is a package manager for Python. ... It's not installed by default with the interpreter. You...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/pypa/pip/issues/536 has an extensive discussion over whether we should force reinstall explicitly specified locations. Apparently I was ambivalent when it was discussed then, as well 🙂
@pfmoore my impression (trying to factor out my own use cases) is that the common use case for direct URLs is very similar to pinning a version. For instance when pointing to a VCS tag, a VCS commit id, an archive with a version number in it, or a local directory, the user says “I want this specific version and not any other one”.
So this could mean direct URL requirements could be handled the same as
==
version specifiers wrt conflict handling.