-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Windows Server 2019 uv access is denied when executing #4980
Comments
Did you install uv into the virtual environment itself? It looks like uv is trying to uninstall itself. |
I believe this is the same as #1368. |
Yes, after creating a virtualenv, we did |
Typically you would install uv globally, since uv doesn't need to be in the virtual environment in order to create it or install into it. (But it's also a known issue on Windows that uv cannot uninstall itself.) |
I'm gonna merge into that other issue, but happy to answer questions there. |
Yeah uv will install into a currently-activated virtualenv even if it's not installed "in" the environment itself. |
## Summary On Windows, we can't delete the currently-running executable -- at least, not trivially. But the [`self_replace`](https://docs.rs/self-replace/latest/self_replace/) crate can help us here. Closes #1368. Closes #4980. ## Test Plan On my Windows machine: - `maturin build` - `python -m venv .venv` - `.venv/Scripts/activate` - `pip install /path/to/uv.whl` - `uv pip install /path/to/uv.whl` - `uv pip uninstall uv`
I installed pyenv 3.12.4 in a Windows Server 2019 using AWS EC2. Created a virtualenv then tried running
uv pip install -r requirements.txt
. This results inRunning
uv help
works just fine.Interesting solution
Renaming uv.exe from
.venv/Scripts/uv.exe
actually makes installation workThe text was updated successfully, but these errors were encountered: