Skip to content

Support Python version number for --python arg when py launcher is not available #1342

@huxuan

Description

@huxuan

How would this feature be useful?

Currently, if we want to specify the python when py launcher is not available, we have to specify the whole command name, for example, we have to use --python python3.12 rather than --python 3.12. It would be more convenient if we can check python3.12 directly when the input value is 3.12.

Describe the solution you'd like

We can use packaging.version module to parse the input value and then compose the command f"python{python_version}" if it is a valid version number.

Describe alternatives you've considered

AFAIK, there is none.

BTW, I can submit a pull request if we agree on this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions