Skip to content

uv python pin --global fails when uv directory does not exists #12178

Closed
@samypr100

Description

@samypr100

Summary

When running uv python pin --global introduced in #12115, it can fail if the uv directory does not exists already.

Linux

$ uv python pin --global 3.13
error: failed to write to file `$HOME/.config/uv/.python-version`: No such file or directory (os error 2)

Windows

> uv python pin --global 3.13
error: failed to write to file `%APPDATA%\Roaming\uv\.python-version`: The system cannot find the path specified. (os error 3)

Platform

Windows, Ubuntu

Version

0.6.7 debug build

Python version

3.13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions