Skip to content

Support non-native project environments #18670

@Vaider7

Description

@Vaider7

Summary

At the current state uv can easily handle non-native platforms on uv sync using --python-platform. But that's actually not the case for non-native environment. For example, if we want to create portable aarch64 environment using conda we cannot use uv to sync packages

Steps to reproduce:

conda create --prefix "$HOME/testpython" -y python=3.13.12 --platform linux-aarch64
conda activate "$HOME/testpython"
export UV_PROJECT_ENVIRONMENT="$HOME/testpython"
uv sync --python-platform aarch64-unknown-linux-gnu --inexact

And it fails with error

error: Failed to query Python interpreter at /home/lisovskiy/testpython/bin/python3
  Caused by: Exec format error (os error 8)

So the solution is to use uv pip install, but it would be really nice if there was a way to manipulate non-native env using uv sync

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionalitywishNot on the immediate roadmap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions