Skip to content

uv init test fails if a directory ~<user>/.venv with no pyvenv.cfg is found #8092

Closed
@pelamlio

Description

@pelamlio

uv version 0.4.20
Linux Ubuntu 24.04.1 LTS

When transitioning (previously using venv, not virtualenv), uv does not find any pyvenv.cfg file directly under the .venv directory and generates an error:

uv init test
error: Broken virtualenv /home/<user>/.venv: pyvenv.cfg is missing

Should the directory be removed or an empty pyvenv.cfg be created at the root of ~/.venv, the command completes as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions