Skip to content

Detect and install tool python version #8229

Open
@Tobi-De

Description

@Tobi-De

This isn’t an issue, but since there’s no discussions tab, I’ll post it here.

Is it possible to install a tool with the appropriate python version it needs without knowing it in advance? (in an automated fashion)

Here’s my scenario: I have a package for which I build a wheel file. I then move the wheel file to another server that has uv installed. Let's say my package specifies python >= 3.13, and the server has Python 3.12 installed. If I run uv tool install <path_to_wheel>, it doesn’t work because Python 3.13 isn’t installed on that server, which makes sense.

Is there a way to automatically detect the Python version of the tool (maybe that can be extracted from the wheel somehow) and install the appropriate version? I want to automate this process, so I’m wondering if there’s a trick or method that can make this work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions