Skip to content

Commit a551285

Browse files
Pin pip version in conda envs to 25.2
25.3 removes the --no-use-pep517 argument, and this breaks the Docker builds as torchaudio and torchvision cannot build without it.
1 parent 44e8794 commit a551285

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.ci/docker/common/install_conda.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ install_miniconda() {
3535
install_python() {
3636
pushd /opt/conda
3737
# Install the selected Python version for CI jobs
38-
as_ci_user conda create -n "py_${PYTHON_VERSION}" -y --file /opt/conda/conda-env-ci.txt python="${PYTHON_VERSION}"
38+
# pip is pinned to 25.2, as 25.3 removes the --no-use-pep517 arg to the install subcommand,
39+
# and this is required to install torchaudio and torchvision.
40+
as_ci_user conda create -n "py_${PYTHON_VERSION}" -y --file /opt/conda/conda-env-ci.txt python="${PYTHON_VERSION}" pip=25.2
3941

4042
# From https://github.com/pytorch/pytorch/blob/main/.ci/docker/common/install_conda.sh
4143
if [[ $(uname -m) == "aarch64" ]]; then

.ci/docker/common/utils.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ conda_install() {
1717
# Ensure that the install command don't upgrade/downgrade Python
1818
# This should be called as
1919
# conda_install pkg1 pkg2 ... [-c channel]
20-
as_ci_user conda install -q -n "py_${PYTHON_VERSION}" -y python="${PYTHON_VERSION}" "$@"
20+
#
21+
# pip is pinned to 25.2, as 25.3 removes the --no-use-pep517 arg to the install subcommand,
22+
# and this is required to install torchaudio and torchvision.
23+
as_ci_user conda install -q -n "py_${PYTHON_VERSION}" -y python="${PYTHON_VERSION}" pip=25.2 "$@"
2124
}
2225

2326
conda_run() {

0 commit comments

Comments
 (0)