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.

Error installing local VCS reference in PEP 440 format

See original GitHub issue

Environment

  • pip version: 20.0
  • Python version: 3.7
  • OS: linux

Description

The following installation of a PEP 440 local VCS reference fails: (using bash to reproduce)

$ git clone https://github.com/pypa/packaging
...
$ pip install "packaging @ git+file://$PWD/packaging"
ERROR: Invalid requirement: 'packaging @ git+file:///home/.../packaging'
Hint: It looks like a path. File 'packaging @ git+file:///home/.../packaging' does not exist.

Expected behavior

It should work, as does the pip-specific URL form:

$ pip install "git+file://$PWD/packaging#egg=packaging"

and as does the PEP 440 form with a remote VCS URL:

$ pip install "packaging @ git+https://github.com/pypa/packaging"

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
pfmoorecommented, Jan 28, 2020

It sounds to me like we might need a discussion on the Packaging discourse, with a view to clarifying the details of direct URLs, and updating the spec to be more precise on what the intended and supported uses are.

Installing from VCS is, I believe, an entirely implementation-defined feature of pip. Short of standardising it (which would be a pretty big exercise) if we wanted to discuss VCS links in standards, we’d need to be viewing them as “a direct URL link to a PEP 517 source tree”, but going much beyond that would need a lot more thought.

FWIW, my view is that packaging @ git+file://$PWD/packaging looks like a perfectly good direct URL to me, and should be acceptable wherever pip accepts a direct URL. But having said that, the PEP says “the exact URLs and targets supported will be tool dependent” - in principle, pip @ mailto:pip@python.org?Subject="Please send me pip" is a valid PEP 440 direct reference 😉

1reaction
sbidoulcommented, Jan 28, 2020

It sounds to me like we might need a discussion on the Packaging discourse, with a view to clarifying the details of direct URLs, and updating the spec to be more precise on what the intended and supported uses are.

Yep. I had identified that PEP 440 needed some clarifications in that area while working on PEP 610. I’ll consider tackling that when PEP 610 is out of Draft state, because I certainly don’t have the mental energy to have two PEP discussions in flight at the same time - this is damn exhausting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PEP 440 – Version Identification and Dependency Specification
This PEP describes a scheme for identifying versions of Python software distributions, ... Local version identifiers MUST comply with the following scheme:.
Read more >
Release Notes — pip 8.1.1 documentation
Implement PEP 513, which adds support for the manylinux1 platform tag, allowing carefully compiled binary wheels to be installed on compatible Linux platforms....
Read more >
pip install - pip documentation v22.3.1
Local file (a sdist or wheel format archive, following the naming conventions for those formats). A requirement, as specified in PEP 440.
Read more >
Third-party dependencies - Pants build
This ambiguity is often a problem when you have 2+ requirements.txt or ... You can also install from local files using PEP 440...
Read more >
pip install — pip 9.1.0.dev0 documentation - Read the Docs
Local file (a sdist or wheel format archive, following the naming conventions for those formats). A requirement, as specified in PEP 440.
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