You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm installing packages inside a Docker container (via a Dockerfile) and wish to install them globally so that they're always available. This should be similar to running pip with root privileges. Unfortunately uv pip install doesn't let me install packages without an existing venv created via uv venv.
error: Failed to locate a virtualenv or Conda environment (checked: `VIRTUAL_ENV`, `CONDA_PREFIX`, and `.venv`). Run `uv venv` to create a virtualenv.
This prevents the subsequent Python commands from running correctly. I have to source .venv/bin/activate for every docker RUN command.
RUN . $VIRTUAL_ENV/bin/activate \
&& python manage.py ...
Ideally uv would let me install packages globally.
Is there anything I can do to enable the venv globally? I've already set the VIRTUAL_ENV and the PATH env vars inside the Dockerfile.
Thanks.
The text was updated successfully, but these errors were encountered:
I'm installing packages inside a Docker container (via a Dockerfile) and wish to install them globally so that they're always available. This should be similar to running
pip
with root privileges. Unfortunatelyuv pip install
doesn't let me install packages without an existingvenv
created viauv venv
.This prevents the subsequent Python commands from running correctly. I have to source
.venv/bin/activate
for every dockerRUN
command.Ideally
uv
would let me install packages globally.Is there anything I can do to enable the
venv
globally? I've already set theVIRTUAL_ENV
and thePATH
env vars inside the Dockerfile.Thanks.
The text was updated successfully, but these errors were encountered: