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

uv pip install -r requirements.txt Fails to Parse Requirements #10417

Closed
merajhashemi opened this issue Jan 8, 2025 · 3 comments
Closed

uv pip install -r requirements.txt Fails to Parse Requirements #10417

merajhashemi opened this issue Jan 8, 2025 · 3 comments

Comments

@merajhashemi
Copy link

Running uv pip install -r requirements.txt fails with a parsing error, while pip install -r requirements.txt works without issues.

requirements.txt content:

--editable '.[dev]'

Error Output:
Running uv pip install -r requirements.txt produces the following error:

error: Couldn't parse requirement in `requirements.txt` at position 11
  Caused by: Expected package name starting with an alphanumeric character, found `'`
'.[dev]'
^

However, pip install -r requirements.txt successfully installs the requirements.

uv version: 0.5.16

@charliermarsh
Copy link
Member

We don't support stringified dependencies like that. You can just remove the quotes -- they aren't needed in a requirements.txt file.

@charliermarsh
Copy link
Member

This is tracked in #3621.

@merajhashemi
Copy link
Author

@charliermarsh

We don't support stringified dependencies like that. You can just remove the quotes -- they aren't needed in a requirements.txt file.

Without the quotes uv pip works; however, pip fails with the following error:

ERROR: .[dev, is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with
 bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp, bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http,
 hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).

I reckon this difference in behavior should be documented in the pip compatibility section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants