Skip to content

Installing conda-build in base to fix failing nightly release#3749

Closed
TahaZahid05 wants to merge 2 commits into
pytorch:masterfrom
TahaZahid05:fix/nightly-failing
Closed

Installing conda-build in base to fix failing nightly release#3749
TahaZahid05 wants to merge 2 commits into
pytorch:masterfrom
TahaZahid05:fix/nightly-failing

Conversation

@TahaZahid05
Copy link
Copy Markdown
Collaborator

Description:

The failure was triggered by an update to Conda (version 26.3.1+). As noted in the Conda Release Notes, the following change was introduced:

  • Deprecation: No longer search for conda-* executables on PATH when building the CLI parser.

Previously, the script installed conda-build into the active sub-environment. Since that sub-environment was on the PATH, Conda could find the conda-build executable and register the build command. With the new version, Conda ignores the PATH and only looks for plugins registered in the base environment.

Solution

Updated conda.recipe/build_and_upload.sh to explicitly install build dependencies into the base environment using the -n base flag. This ensures that the build command is correctly registered as a plugin for the main conda executable.

Reproduction Steps

I verified this fix locally by reproducing the failure on Conda 26.3.2 using these steps:

1. Reproduce the Failure:

# Ensure local conda is 26.3.2+
conda install -n base -y conda=26.3.2

# Ensure base is clean of build tools
conda remove -n base -y conda-build

# Install tools ONLY in a sub-environment
conda create -y -n reproduce_failure
conda install -y -n reproduce_failure conda-build

# Try to run build from the sub-environment
conda activate reproduce_failure
conda build --version

# RESULT: Fails with "invalid choice: 'build'"

2. Verify the Fix:

# Install tools into the base environment
conda install -y -n base conda-build

# Try again from the sub-environment
conda activate reproduce_failure
conda build --version

# RESULT: Success! (Prints conda-build version)

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

Copy link
Copy Markdown
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TahaZahid05 TahaZahid05 mentioned this pull request May 11, 2026
3 tasks
@vfdev-5 vfdev-5 closed this May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants