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

Support for uv pip install --user #1584

Closed
Chaz6 opened this issue Feb 17, 2024 · 3 comments
Closed

Support for uv pip install --user #1584

Chaz6 opened this issue Feb 17, 2024 · 3 comments
Assignees
Labels
compatibility Compatibility with a specification or another tool duplicate This issue or pull request already exists enhancement New feature or request

Comments

@Chaz6
Copy link

Chaz6 commented Feb 17, 2024

uv pip install does not support the flag --user. The help for pip install --user is as follows:-

  --user                      Install to the Python user install directory for your platform. Typically ~/.local/, or
                              %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)
@zanieb
Copy link
Member

zanieb commented Feb 17, 2024

Related #1526, we do not allow installation outside of a virtual environment right now.

@Rotonen
Copy link

Rotonen commented Apr 8, 2024

For a bit more context beyond tiered-managed-yet-sans-virtualenv academic and enterprise (modified cacerts, PKI trust - not everything can use truststore yet) userspace deployments, this also has a practical use in building Docker containers, which assemble software from multiple ecosystems and/or have some security policies in place (only centrally curated base images can do USER root, all internal build time steps beyond those base images must run as uid >= 1000).

In those situations it's convenient or necessary to be able to COPY --from=python-build /home/<user>/.local/... the local Python eggs across build stages.

Currently one could work around this by using a virtualenv and an entrypoint script to load that virtualenv up.

But there is a tendency towards extremely minimal hardened images (for general open reference check out what Microsoft is doing with the Dotnet chiseled Ubuntu images). These kinds of runtime images do not ship a shell, thus making the entrypoint workaround impossible. That leaves setting the virtualenv up manually via ENV as the main workaround, and that has implementation time ripple effects around templating of containers when doing internal containers at scale (or leaving it as a fragile pile of copy paste snippets, which people either get right, or don't).

In general implementing uv pip install --user will remove a lot of workarounds needed for uv to "just work" across a wider variety of non-happy-path deployment scenarios currently out there.

@zanieb
Copy link
Member

zanieb commented May 17, 2024

I'm going to close this in favor of #2077 which has a bunch more discussion in it.

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@zanieb zanieb added the duplicate This issue or pull request already exists label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants