Skip to content

Access is Denied on Windows with uv sync. OS Code Error -2147024891 #17430

Closed as duplicate

Description

@peroksid

Summary

In the corporate environment, in Windows 11, with some security programs running, on a local drive, in a virtual machine, uv sync throws occasional "Access is denied", and in the end of installing dependencies consistently throws "Access is denied" for the editable or non-editable package itself.

It happens in Python 3.11, 3.12, 3.13 for uv >0.9.8, <= 0.9.20.

We pinned to 0.9.8, and it stopped happening.

Platform

Windows 11 x86_64

Version

uv >0.9.8, <= 0.9.20

Python version

Python 3.11, 3.12, 3.13

Activity

  1. added
    bug
    on Jan 12, 2026
  2. zanieb commented on Jan 12, 2026

    @zanieb
    Member

    Can you reproduce on the latest version too?

  3. peroksid commented on Jan 13, 2026

    @peroksid
    Author

    Only up to 0.9.21. Can't try the newer versions because they are not available in the pypi proxy mirror.

  4. Spectre5 commented on Jan 28, 2026

    @Spectre5

    I've also been hit with this same problem. I've tried with the latest release (0.9.27) and still have the problem.

    Thanks for the tip on downgrading - using 0.9.8 has allowed me to continue forward!

    I also suspect the issue is some AV software or something at my company, but I don't know any details and don't get any notification about it suppressing anything. The latest version of uv has no issue when run in CI/CD, so it's definitely a Windows or AV issue...though interesting that older versions of uv do work.

    I'm using a JFrog Artifactory PyPI mirror with username/password, in case that matters.

  5. zanieb commented on Jan 29, 2026

    @zanieb
    Member

    Generally the older versions have been manually flagged as not malicious.

  6. MasterRoshan commented on Mar 1, 2026

    @MasterRoshan

    This is a guess: during a wheel script install the remove does not have any retry backoff. An AV could open the file with sharing mode as read only.

    fs::remove_file(&path)?;

  7. added
    area:windows
    needs-mre
    on Apr 20, 2026
  8. MasterRoshan commented on Jun 12, 2026

    @MasterRoshan

    Some things worth noting on my end, others might also confirm.

    • The error seems to occur on installation of a package containing an entrypoint/trampoline, ipython for instance
    • The error is likely raised before any retries, we are not waiting ~10 seconds to fail out of a retry backoff.
    • Rerunning uv sync seems to consistently complete the installation of the failed package and will continue until another package containing an entrypoint fails. Repeating this until all packages are installed is a workaround for this issue
  9. woodruffw commented on Jun 16, 2026

    @woodruffw
    Member

    Triage: deduping with #15968.

    If you're experiencing this problem are you're able to consistently reproduce it, please let us know! So far the most likely cause is an interfering AV/EDR product, which is not something that uv can easily control for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:windowsbugneeds-mre

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions