Skip to content

Installation of mypy 1.18 fails with uv ("Access denied" during cache rename) Windows in enterprise environment #20200

@MarcCharron

Description

@MarcCharron

Bug Report

I'm unable to install mypy==1.18.2 using the uv package manager in a Windows enterprise environment.
The installation fails with an “Access denied” error when trying to rename a temporary cache file.

Older versions like mypy==1.3.0 install successfully, so I'm wondering if something changed in the packaging or wheel structure between these versions.

This issue might be related to antivirus or endpoint protection software, but I’d like to confirm whether the Mypy distribution (wheel or source tarball) could trigger stricter Windows file operations or permission issues.


To Reproduce

pyproject.toml

[tool.uv]
dev-dependencies = [
    "mypy==1.18.2",
]

Command:

uv sync

Expected Behavior

Resolved 52 packages in 837ms
      Built project_xxxxx @ file:///C:/Users/USERXXX/git_local/project_xxxxx
Prepared 1 package in 31ms
Uninstalled 1 package in 45ms
Installed 3 packages in 832ms
~ project_xxxxx==0.1.0 (from file:///C:/Users/USERXXX/git_local/project_xxxxx)
+ mypy==1.3.0
+ mypy-extensions==1.1.0

Actual Behavior

Using CPython 3.12.10 interpreter at: C:\Program Files\Python\python.exe
Creating virtual environment at: .venv
  × Failed to download `mypy==1.18.2`
  ├─▶ Failed to read from the distribution cache
  ╰─▶ failed to rename file from C:\Users\USERXXX\AppData\Local\uv\cache\.tmpY0qi9j 
      to C:\Users\USERXXX\AppData\Local\uv\cache\archive-v0\YQY-kdG0vVLvidw-fW6wT: 
      Access denied. (os error 5)
  help: `mypy` (v1.18.2) was included because `project_xxxx:dev` (v0.1.0) depends on `mypy`

Environment

  • Mypy version: 1.18.2
  • Python version: 3.12.10
  • OS: Windows 10 Enterprise
  • Package manager: uv
  • Environment: corporate network (likely antivirus active)

Notes

  • Installing mypy==1.3.0 works fine with the same setup.
  • Installing mypy==1.18.2 via pip also works fine.
  • The issue seems specific to the caching or rename step during installation.

Thanks in advance for your support! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongpendingIssues that may be closed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions