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 filename.whl is not supported #1372

Closed
hauntsaninja opened this issue Feb 15, 2024 · 5 comments
Closed

uv pip install filename.whl is not supported #1372

hauntsaninja opened this issue Feb 15, 2024 · 5 comments
Labels
question Asking for clarification or support

Comments

@hauntsaninja
Copy link
Contributor

If you have a wheel file floating around, pip gives you a way to install it. Is there a way to do this in uv?

Context: we have some custom packaging code at work, currently in some cases we end up doing pip install --no-deps firstparty1.whl firstparty2.whl firstparty3.whl and it would be nice for this to be much faster than it is with pip

@zanieb
Copy link
Member

zanieb commented Feb 15, 2024

Yes this is possible, you need to provide a name for the packages though

❯ python3.12 -m packse build-pkg example 0.1.0 --rm
Generated project for 'example-0.1.0'in 5.43ms
Built package 'example-0.1.0' in 0.20s
Linked distribution to dist/example/example-0.1.0-py3-none-any.whl
Linked distribution to dist/example/example-0.1.0.tar.gz
Done in 203.84ms

❯ uv pip install example@./dist/example/example-0.1.0-py3-none-any.whl
Resolved 1 package in 8ms
Downloaded 1 package in 3ms
Installed 1 package in 1ms
 + example==0.1.0 (from file:///Users/mz/eng/src/astral-sh/uv/dist/example/example-0.1.0-py3-none-any.whl)

@zanieb zanieb added the question Asking for clarification or support label Feb 15, 2024
@hauntsaninja
Copy link
Contributor Author

Thank you! Yeah I tried to guess that but then got the error in #1374

@carlosperate
Copy link

Could this be a feature request? to be able to install the wheel without having to specify the name?
Mostly to keep feature parity with pip and be able to be a drop-in replacement.

@zanieb
Copy link
Member

zanieb commented Feb 16, 2024

This mismatch in behavior is actually intentional because it was hard to implement, but we plan to do it. See #313 for the tracking issue.

@charliermarsh
Copy link
Member

This is supported as of v0.1.24. You can uv pip ./filename.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
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

4 participants