Skip to content

.venv can't be deleted in the devcontainer #301

@tpoliaw

Description

@tpoliaw

Several uv commands delete and recreate the .venv directory. In the container the directory can't be deleted (because it's a volume mount?) so the uv commands fail the first time. Running them again works as expected.

$ uv run python
Python 3.11.13 (main, Oct  7 2025, 15:34:32) [Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>> ^D
$ uv run --python 3.12 python
Using CPython 3.12.12
error: failed to remove directory `/workspaces/blueapi/.venv`: Resource busy (os error 16)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions