Open WSF-SEO-AM opened 1 month ago
So, it seems like this co-existince is possible so long that pyenv creates the virtual environment and the uv venv is not used, rather the environment is activated and deactivated via pyenv itself. By doing this it is possible to leverage on uv managing the pyproject.toml file as well as the pip command and it's increased speed.
The only problem is that the management of the pyproject file stick to the uv creating its own .venv directory. And this to me is something that could be improved.
Hi! Did you see the UV_PROJECT_ENVIRONMENT
setting?
Nope. I'm currently discovering the bits and bobs. Can you suggest how this is used? Is it a one off when the venv is invoked for the first time? Or, like the TLS setting one, it has to be specified all the times?
It has to be specified at all times. In your case, I'd set it up so it automatically changes per directory, e.g., with direnv
or as a variable in the pyenv
environment?
So that I understand ... all the times I invoke a source venv activate? Do I need to specify it there all the times? Is any place where I can hardcode the path on a per project basis?
@zanieb sorry to chase. Can u please help me here providing more guidance on how to setup uv with a conf file if necessary that specify a variable it can read without the need to make very much complicate command lines?
I've a couple of projects of mine that have been started with pyenv only.. I'm now attracted by the idea of using UV as a factotum, but I'm unsure whether the existing pyenv virtual environment can be designated as a location for UV too.
See below a preliminary attempt of setting the environment path:
Is this concurrent setup something for which support should be expected, or UV is meant to run only on its own?