Skip to content

Python cannot be found on unsupported architectures #8657

@lengau

Description

@lengau

On unsupported architectures (e.g. riscv64), uv cannot find the local Python because the machine is not in a list of known items:

uv output
# uv python find --verbose
DEBUG uv 0.4.19
DEBUG Searching for default Python interpreter in managed installations or system path
DEBUG Searching for managed installations at `/root/.local/share/uv/python`
DEBUG Failed to inspect Python interpreter from search path at `/usr/bin/python3`
DEBUG Skipping bad interpreter at /usr/bin/python3 from search path: Querying Python at `/usr/bin/python3` did not return the expected data
unknown variant `riscv64`, expected one of `aarch64`, `armv6l`, `armv7l`, `powerpc64le`, `powerpc64`, `x86`, `x86_64`, `s390x`
--- stdout:
{"result": "success", "markers": {"implementation_name": "cpython", "implementation_version": "3.12.3", "os_name": "posix","platform_machine": "riscv64", "platform_python_implementation": "CPython", "platform_release": "6.11.0-8-generic", "platform_system": "Linux", "platform_version": "#8.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  1 11:40:56 UTC 2024", "python_full_version": "3.12.3", "python_version": "3.12", "sys_platform": "linux"}, "sys_base_prefix": "/usr", "sys_base_exec_prefix": "/usr", "sys_prefix": "/usr", "sys_base_executable": "/usr/bin/python3", "sys_executable": "/usr/bin/python3", "sys_path": ["/root/.cache/uv/.tmpvWackB", "/usr/lib/python312.zip", "/usr/lib/python3.12", "/usr/lib/python3.12/lib-dynload", "/usr/local/lib/python3.12/dist-packages", "/usr/lib/python3/dist-packages"], "stdlib": "/usr/lib/python3.12", "scheme": {"platlib": "/usr/local/lib/python3.12/dist-packages", "purelib": "/usr/local/lib/python3.12/dist-packages", "include": "/usr/include/python3.12", "scripts": "/usr/local/bin", "data": "/usr/local"}, "virtualenv": {"purelib": "lib/python3.12/site-packages", "platlib": "lib/python3.12/site-packages", "include": "include/site/python3.12", "scripts": "bin", "data": ""}, "platform": {"os": {"name": "manylinux", "major": 2, "minor": 39}, "arch": "riscv64"}, "manylinux_compatible": true, "gil_disabled": false, "pointer_size": "64"}
--- stderr:

---
DEBUG Failed to inspect Python interpreter from search path at `/usr/bin/python3.12`
DEBUG Skipping bad interpreter at /usr/bin/python3.12 from search path: Querying Python at `/usr/bin/python3.12` did not return the expected data
unknown variant `riscv64`, expected one of `aarch64`, `armv6l`, `armv7l`, `powerpc64le`, `powerpc64`, `x86`, `x86_64`, `s390x`
--- stdout:
{"result": "success", "markers": {"implementation_name": "cpython", "implementation_version": "3.12.3", "os_name": "posix","platform_machine": "riscv64", "platform_python_implementation": "CPython", "platform_release": "6.11.0-8-generic", "platform_system": "Linux", "platform_version": "#8.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  1 11:40:56 UTC 2024", "python_full_version": "3.12.3", "python_version": "3.12", "sys_platform": "linux"}, "sys_base_prefix": "/usr", "sys_base_exec_prefix": "/usr", "sys_prefix": "/usr", "sys_base_executable": "/usr/bin/python3.12", "sys_executable": "/usr/bin/python3.12", "sys_path": ["/root/.cache/uv/.tmp84TuZT", "/usr/lib/python312.zip", "/usr/lib/python3.12", "/usr/lib/python3.12/lib-dynload", "/usr/local/lib/python3.12/dist-packages", "/usr/lib/python3/dist-packages"], "stdlib": "/usr/lib/python3.12", "scheme": {"platlib": "/usr/local/lib/python3.12/dist-packages", "purelib": "/usr/local/lib/python3.12/dist-packages", "include": "/usr/include/python3.12", "scripts": "/usr/local/bin", "data": "/usr/local"}, "virtualenv": {"purelib": "lib/python3.12/site-packages", "platlib": "lib/python3.12/site-packages", "include": "include/site/python3.12", "scripts": "bin", "data": ""}, "platform": {"os": {"name": "manylinux", "major": 2, "minor": 39}, "arch": "riscv64"}, "manylinux_compatible": true, "gil_disabled": false, "pointer_size": "64"}
--- stderr:

---
DEBUG Failed to inspect Python interpreter from search path at `/bin/python3`
DEBUG Skipping bad interpreter at /bin/python3 from search path: Querying Python at `/bin/python3` did not return the expected data
unknown variant `riscv64`, expected one of `aarch64`, `armv6l`, `armv7l`, `powerpc64le`, `powerpc64`, `x86`, `x86_64`, `s390x`
--- stdout:
{"result": "success", "markers": {"implementation_name": "cpython", "implementation_version": "3.12.3", "os_name": "posix","platform_machine": "riscv64", "platform_python_implementation": "CPython", "platform_release": "6.11.0-8-generic", "platform_system": "Linux", "platform_version": "#8.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  1 11:40:56 UTC 2024", "python_full_version": "3.12.3", "python_version": "3.12", "sys_platform": "linux"}, "sys_base_prefix": "/usr", "sys_base_exec_prefix": "/usr", "sys_prefix": "/usr", "sys_base_executable": "/bin/python3", "sys_executable": "/bin/python3", "sys_path": ["/root/.cache/uv/.tmpxChyuH", "/usr/lib/python312.zip", "/usr/lib/python3.12", "/usr/lib/python3.12/lib-dynload", "/usr/local/lib/python3.12/dist-packages", "/usr/lib/python3/dist-packages"], "stdlib": "/usr/lib/python3.12", "scheme": {"platlib": "/usr/local/lib/python3.12/dist-packages", "purelib": "/usr/local/lib/python3.12/dist-packages", "include": "/usr/include/python3.12", "scripts": "/usr/local/bin", "data": "/usr/local"}, "virtualenv": {"purelib": "lib/python3.12/site-packages", "platlib": "lib/python3.12/site-packages", "include": "include/site/python3.12", "scripts": "bin", "data": ""}, "platform": {"os": {"name": "manylinux", "major": 2, "minor": 39}, "arch": "riscv64"}, "manylinux_compatible": true, "gil_disabled": false, "pointer_size": "64"}
--- stderr:

---
DEBUG Failed to inspect Python interpreter from search path at `/bin/python3.12`
DEBUG Skipping bad interpreter at /bin/python3.12 from search path: Querying Python at `/bin/python3.12` did not return theexpected data
unknown variant `riscv64`, expected one of `aarch64`, `armv6l`, `armv7l`, `powerpc64le`, `powerpc64`, `x86`, `x86_64`, `s390x`
--- stdout:
{"result": "success", "markers": {"implementation_name": "cpython", "implementation_version": "3.12.3", "os_name": "posix","platform_machine": "riscv64", "platform_python_implementation": "CPython", "platform_release": "6.11.0-8-generic", "platform_system": "Linux", "platform_version": "#8.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct  1 11:40:56 UTC 2024", "python_full_version": "3.12.3", "python_version": "3.12", "sys_platform": "linux"}, "sys_base_prefix": "/usr", "sys_base_exec_prefix": "/usr", "sys_prefix": "/usr", "sys_base_executable": "/bin/python3.12", "sys_executable": "/bin/python3.12", "sys_path": ["/root/.cache/uv/.tmpzRiSA8", "/usr/lib/python312.zip", "/usr/lib/python3.12", "/usr/lib/python3.12/lib-dynload", "/usr/local/lib/python3.12/dist-packages", "/usr/lib/python3/dist-packages"], "stdlib": "/usr/lib/python3.12", "scheme": {"platlib": "/usr/local/lib/python3.12/dist-packages", "purelib": "/usr/local/lib/python3.12/dist-packages", "include": "/usr/include/python3.12", "scripts": "/usr/local/bin", "data": "/usr/local"}, "virtualenv": {"purelib": "lib/python3.12/site-packages", "platlib": "lib/python3.12/site-packages", "include": "include/site/python3.12", "scripts": "bin", "data": ""}, "platform": {"os": {"name": "manylinux", "major": 2, "minor": 39}, "arch": "riscv64"}, "manylinux_compatible": true, "gil_disabled": false,"pointer_size": "64"}
--- stderr:

---
error: No interpreter found in virtual environments, managed installations, or system path

If the platform_machine of a local Python matches the machine type from uname, uv should also accept it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinguv pythonRelated to the uv python interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions