Skip to content

Allow using alternative pip installers in installation scripts#2659

Closed
yuxuan-z19 wants to merge 3 commits intopytorch:mainfrom
yuxuan-z19:zyx-uv
Closed

Allow using alternative pip installers in installation scripts#2659
yuxuan-z19 wants to merge 3 commits intopytorch:mainfrom
yuxuan-z19:zyx-uv

Conversation

@yuxuan-z19
Copy link
Copy Markdown

@yuxuan-z19 yuxuan-z19 commented Nov 26, 2025

Currently, installation scripts always invoke pip via sys.executable -m pip in subprocesses.
This PR introduces get_pip_cmd(), which:

  • Uses the PIP_MODULE environment variable to override the installer if set.

    PIP_MODULE="uv pip" python install.py
  • Defaults to sys.executable -m pip otherwise.

This improves flexibility and compatibility with environments that use alternative pip executables. (See install.log for an example with uv.)

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Nov 26, 2025

Hi @yuxuan-z19!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Nov 26, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the cla signed label Nov 26, 2025
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented Nov 26, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@yuxuan-z19
Copy link
Copy Markdown
Author

yuxuan-z19 commented Nov 29, 2025

Removed the uv fallback, and the installer now only honors PIP_MODULE when provided and otherwise falls back to sys.executable -m pip, as discussed in meta-pytorch/tritonbench#672 (comment)

@yuxuan-z19 yuxuan-z19 closed this by deleting the head repository Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant