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

Make uv seed pip by default #12247

Open
ThermodynamicBeta opened this issue Mar 17, 2025 · 2 comments
Open

Make uv seed pip by default #12247

ThermodynamicBeta opened this issue Mar 17, 2025 · 2 comments
Labels
enhancement New feature or improvement to existing functionality

Comments

@ThermodynamicBeta
Copy link

Summary

Sorry if this is duplicate.
Currently, if you have a uv-created venv activated, pip is not available and so it points to your system pip. You can add pip to your uv venv when you create it with the --seed flag, but I think it should be this way by default and I'm curious why it isn't

Reasons:

  • I would expect a venv to have pip in it. If I ssh into a shared linux server and find and activate a virtual environment, I would expect to be able to use pip. People who don't know what uv is would be very confused in this situation
  • I manage a python package for ~100 engineers internally at a company. We are migrating our main project from pip to uv, and it would help to have commands that work regardless of how they set up their venv, i.e. pip install x pip show x, rather than "if you set this up with uv, do this x, otherwise y".

Because of the above two reasons, I basically will only use and instruct others to use uv venv with the --seed flag, which makes me feel like it should be the default.

I understand seed is configurable with environment variable, but:

  • We use both Windows and Linux, setting environment variables on Windows is a mess (both the UI and the PS command) and very tedious and multiplying that by 100 engineers each who each have multiple computers is a big loss.

Example

uv venv
.venv/Scripts/activate
pip install pandas
uv pip show pandas
@ThermodynamicBeta ThermodynamicBeta added the enhancement New feature or improvement to existing functionality label Mar 17, 2025
@samypr100
Copy link
Collaborator

I know there's many packages out there that run pip on your behalf using sys.execuble such as spacy e.g. via python -m spacy download xyz.

I believe something like this could help those scenarios, although this could easily be a breaking change.

@shauneccles
Copy link

I think this is a deliberate design decision to add a barrier to using pip inside uv venvs and I think that's the right choice.

What is the barrier to using native uv commands?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants