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

Installing from local wheel fails when using pip install <path> #1403

Closed
cfculhane opened this issue Feb 16, 2024 · 4 comments
Closed

Installing from local wheel fails when using pip install <path> #1403

cfculhane opened this issue Feb 16, 2024 · 4 comments

Comments

@cfculhane
Copy link

This is occuring when installing a package with cuda version specified with +cu117 in the wheel name, e.g. for detectron2 or torch

To repro:

  1. Download wheel, e.g. botocore from pypi: https://files.pythonhosted.org/packages/74/f8/fb598ee499f19c1532cf47a6eb34c3c20447f9f81e48bb82a017a49bab6a/botocore-1.34.43-py3-none-any.whl
  2. cp botocore-1.34.43-py3-none-any.whl botocore-1.34.43+cu117-py3-none-any.whl
  3. uv pip install ./botocore-1.34.43+cu117-py3-none-any.whl # fails with Expected package name starting with an alphanumeric character
  4. uv pip install botocore-1.34.43+cu117-py3-none-any.whl # fails with URL requirement must be preceded by a package name.
  5. Trying the original package without the +cu117 fails too, Because botocore-1-34-43-py3-none-any-whl was not found in the package registry and you require botocore-1-34-43-py3-none-any-whl, we can conclude that the requirements are unsatisfiable.

All of the above works with pip just fine, it would be great if it did!

Note that uv pip install "botocore @ ./botocore-1.34.43+cu117-py3-none-any.whl" and uv pip install "botocore @ file:////botocore-1.34.43-py3-none-any.whl" work just fine, but this is a little unintuitive compared the behaviour from pip

@zanieb
Copy link
Member

zanieb commented Feb 16, 2024

Thanks for the report. I think this is a duplicate of #313 (I know that one's pretty buried!). Or is it specifically with regards to the +... part?

Similar #1372

@cfculhane
Copy link
Author

Apoligies, didnt see that (I didnt know a local path counted as a URL dependency, although I guess that makes sense!). The + works fine when the fully specified package @ path is given, so I think this can be closed as duplicate in that case.

@zanieb
Copy link
Member

zanieb commented Feb 16, 2024

Okay thanks!

@charliermarsh
Copy link
Member

This is supported as of v0.1.24. You can uv pip ./botocore-1.34.43+cu117-py3-none-any.whl directly, without including a package name.

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

3 participants