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

Freeze generated requirements aren't properly formatted for git and local dependencies #2677

Closed
tonydavis629 opened this issue Mar 26, 2024 · 5 comments
Labels
needs-mre Needs more information for reproduction

Comments

@tonydavis629
Copy link

I have a project with dependencies installed from github and from local disk.

uv pip freeze > requirements.txt

generates a requirements.txt with lines such as

cutie==1.0.0 (from file:///home/jovyan/clips-labeler/Cutie)
segment-anything==1.0 (from git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588)

I try to install from this requirements.txt

uv pip install -r requirements.txt

and it seems the requirements.txt is not in the right format for these types of dependencies.

error: Couldn't parse requirement in `requirements.txt` at position 250
  Caused by: Trailing `(from file:///home/jovyan/clips-labeler/Cutie)` is not allowed
cutie==1.0.0 (from file:///home/jovyan/clips-labeler/Cutie)

and

error: Couldn't parse requirement in `requirements.txt` at position 1848
  Caused by: Trailing `(from git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588)` is not allowed
segment-anything==1.0 (from git+https://github.com/facebookresearch/segment-anything.git@6fdee8f2727f4506cfbbe553e23b895e27956588)

I can manually modify these lines to use the '@' for uv, but I feel like this should be the default.

@zanieb zanieb added the bug Something isn't working label Mar 26, 2024
@zanieb
Copy link
Member

zanieb commented Mar 26, 2024

Thanks for the report!

@charliermarsh
Copy link
Member

Do you know what uv version you're on? This was fixed long ago.

@charliermarsh charliermarsh added needs-mre Needs more information for reproduction and removed bug Something isn't working labels Mar 26, 2024
@tonydavis629
Copy link
Author

Indeed I was on an older version. You guys are moving so fast you think 3 weeks is a long time!

@charliermarsh
Copy link
Member

Thanks so much for following up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mre Needs more information for reproduction
Projects
None yet
Development

No branches or pull requests

3 participants