Skip to content
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

Sometimes uv cannot update itself inside a virtual env (Windows) #3239

Closed
inoa-jboliveira opened this issue Apr 24, 2024 · 2 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@inoa-jboliveira
Copy link

inoa-jboliveira commented Apr 24, 2024

There are some circunstances where uv cannot update itself. I believe I've seen this work before, but currently I am unable to perform the command from inside an env.

  • OS: Windows 11
  • uv installed 0.1.35, upgrading to 0.1.37
  • The env was created by python -m uv venv
  • I dont have a system uv in my PATH outside the env

Virtual env was enabled and the executable is the one running on the virtualenv which means it is replacing the same file that is running.
It is not an issue with admin file permission since pip install uv does work on the same shell.

uv pip install uv --upgrade
Resolved 1 package in 1.82s
Downloaded 1 package in 2.24s
error: failed to remove file `C:\Data\pproject\env\Lib\site-packages\../../Scripts/uv.exe`
  Caused by: Access is denied. (os error 5)

If it is related to the file being open by the process, it would be possible to name it uv.exe.tmp and then trigger a new process to rename it?

@charliermarsh
Copy link
Member

I think this is a duplicate of #1368.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Apr 24, 2024
@charliermarsh
Copy link
Member

But yeah definitely a bug related to trying to replace the currently-running executable.

@zanieb zanieb added the duplicate This issue or pull request already exists label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants