-
Notifications
You must be signed in to change notification settings - Fork 765
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
uv venv fails to create a venv if the directory if not empty #1863
Comments
Can you say more about the use-case here? |
When not developing a python project (where the venv is managed by tools like poetry), Working on multiple laptops, and various distributions and different temporary WSL-distros I simplified my workflow to install (non-system packaged) tools to "make install". I moved away from tools like pipx and pipenv my tools-repo is public:
The needed excutables are then symlinked to /opt/tools/bin which is the only dir put on $PATH Currently most-used uv-based initial workflow is:
But when foo is a checkout-dir with a makefile, refuses to create the venv, where 'python-m venv' or 'virtualenv' don't object. |
I encountered this issue as well, with a slightly different use case: We use the ninja build system to build C/C++ and also manage Python dependencies via tasks: "Create a venv", "Install these requirements", "Editable-install package A", "Editable-install package B", "run A tests", "run B tests", "Wheel A", etc. Ninja uses file timestamps to determine if a target is up-to-date, so we have "proxy" timestamp files that represent things like "this requirements.txt file was installed" because it's otherwise hard to tell whether it happened by looking at the filesystem. If We put these timestamp files inside the venv directory, inside a Anyway, it's kind of a niche corner case, but it's also very nice in that if you just want to Maybe something like That would be safer than build-system |
tested with:
The fail-message is trivially correct and expected in this case, but should not be an error
th venv-creation would not overwrite any existing files or dirs.
but no problem with virtualenv:
The text was updated successfully, but these errors were encountered: