How to get current `uv pip install` `--python-platform`?
Jun 10, 9:17am
To get the current --python-platform value used by uv pip install, you can use the following approach:
1. Check uv Configuration
uv (a fast Python package installer) respects the target platform for pip installations. The --python-platform flag specifies the platform (e.g., linux_x86_64, macos_arm64, windows_amd64).
To see the default platformuv is using, run:
bash
uv pip install --help | grep -A 5 "python-platform"
This will show the default value in the help text.
2. Detect the Current Platform
If you want to detect the platform of the current system, you can use Python: