Open ion-elgreco opened 1 month ago
Are you asking if there's a way to achieve the --system
behavior without passing --system
?
We explicitly don't allow installing packages into the managed Python installation environments.
We explicitly don't allow installing packages into the managed Python installation environments.
Why not?
Because they're only intended to be sources for creating virtual environments. We are trying to move away from mutable global state.
Because they're only intended to be sources for creating virtual environments. We are trying to move away from mutable global state.
Hmm I need to setup a system wide installation which has all the packages since the environment has no internet access. I think there is still some domains that need this
Perhaps our Docker guide would be helpful to demonstrate how to setup a system-wide environment.
Perhaps our Docker guide would be helpful to demonstrate how to setup a system-wide environment.
I'm using a custom base image, so I wanted to avoid the hassle of installing a specific python version and use UV for that, and then install packages in that managed python version.
But I will install the python version I need explicitly then
You can still do that, you just need to put create a virtual environment and put it on the path (as described in the linked guide). Is there a reason that's not an option?
You can still do that, you just need to put create a virtual environment and put it on the path (as described in the linked guide). Is there a reason that's not an option?
There is no project to install so to say, also the directory where stuff will happen is not fixed
I'm not sure I really understand your point, why isn't this sufficient:
uv venv
export VIRTUAL_ENV="$(pwd)/.venv"
export PATH="$VIRTUAL_ENV/bin:$PATH"
I'm not sure I really understand your point, why isn't this sufficient:
uv venv export VIRTUAL_ENV="$(pwd)/.venv" export PATH="$VIRTUAL_ENV/bin:$PATH"
Because the working directory might not be known, so someone has to specifically know the venv path since our IDE's don't recognize it automatically.
I tried this now with a small test but having a system installation with packages installed in it, has the preference
so someone has to specifically know the venv path since our IDE's don't recognize it automatically.
Why don't you make the virtual environment in a specific location then? One that your IDE looks in?
The IDE won't look in the managed Python environment either, it's in an arbitrary location.
Currently when you install packages with
--system
it will use the system installation. Is there a way to force to install packages in the managed installation without creating a venv?