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 equivalent to pipx inject #7312

Closed
zachvalenta opened this issue Sep 11, 2024 · 4 comments
Closed

uv equivalent to pipx inject #7312

zachvalenta opened this issue Sep 11, 2024 · 4 comments
Labels
question Asking for clarification or support uv tool Related to the uv tool interface

Comments

@zachvalenta
Copy link

I searched through issues but didn't find anything similar - apologies if there's already an issue that I missed.

pipx let's you install ('inject') additional packages into an env e.g. add psycopg2 into the env for visidata so you can connect to Postgres:

pipx install visidata
pipx inject visidata psycopg2

Does uv have this capability now or, if not, is it on the roadmap?

@zachvalenta zachvalenta changed the title uv tool equivalent for pipx inject uv equivalent to pipx inject Sep 11, 2024
@zanieb
Copy link
Member

zanieb commented Sep 11, 2024

I think we explicitly won't provide this — you should enumerate all the dependencies in the installation.

There's #3560 but I'm not sure if it's explicitly discussed.

@zanieb zanieb added question Asking for clarification or support uv tool Related to the uv tool interface labels Sep 11, 2024
@zachvalenta
Copy link
Author

Based on the issue you linked, seems like the way this works in uv is via the --with arg, yes?

# pipx
pipx install visidata
pipx inject visidata psycopg2

# uv
uv tool install --with psycopg2 visidata

@zanieb
Copy link
Member

zanieb commented Sep 12, 2024

Yep! This is covered in https://docs.astral.sh/uv/concepts/tools/#including-additional-dependencies — the RFC isn't necessarily exactly what was implemented.

@zachvalenta
Copy link
Author

Great. Will close this issue, and now anyone coming from pipx and the semantics of 'inject' will find the uv way of doing it.

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 uv tool Related to the uv tool interface
Projects
None yet
Development

No branches or pull requests

2 participants