question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip does not reinstall an already installed package from a different direct url requirement

See original GitHub issue

What’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:closed
  • Created 4 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
pfmoorecommented, Jan 31, 2020

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 🙂

1reaction
sbidoulcommented, Feb 6, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found