0

I am trying to download and install Python wheel packages into a uv virtual environment for a non-native (cross-platform) target environment.

When using pip, I would typically use flags like --platform, --abi, and --implementation (or --python-version) to specify the desired environment constraints for downloading compatible wheels:

Bash

# Example pip command
pip install --platform manylinux2014_x86_64 --abi cp310 --implementation cp --python-version 3.10 numpy

I'm looking for the equivalent options in the uv tool. Specifically, I am using uv install within an active uv virtual environment.

I have checked the uv install --help output and the official uv documentation but cannot find direct equivalents for these flags (e.g., --platform, --abi).

My Questions:

  1. Does uv offer equivalent command-line options to specify the target interpreter, platform, and ABI for cross-platform wheel resolution and installation? If so, what are they?

  2. If uv does not support these options directly via uv install, is it possible to use pip to install packages into a virtual environment created and managed by uv?

  3. If both of the above are not possible, what is the recommended uv workflow for managing dependencies for a target environment (e.g., a Docker container or a different architecture) that is not the machine running uv?

1
  • 3
    My opinion is that non-native (cross-platform) installation with pip is only possible in a very simple situation: all dependencies are available at PyPI as wheels for the target platform. My experience is that it's seldom the case; even one source-only dependency breaks the installation. Hence my advise is: use a virtual machine that runs the target platform (processor, OS, Python version) and use pip download inside the VM to download all packages; then move the packages to the target host and pip install them there. Commented Oct 27 at 17:07

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.