From c38238fe2dfda1dbc4f05b432d4ac1ea2d0d0c95 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 18 Sep 2024 12:09:08 -0500 Subject: [PATCH] add Python 3.12 support in install selector (#539) Co-authored-by: Bradley Dice --- _includes/selector.html | 29 +++++++++++++++-------------- install/install.md | 3 ++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/_includes/selector.html b/_includes/selector.html index 61efec5d9af..906b1012238 100644 --- a/_includes/selector.html +++ b/_includes/selector.html @@ -379,9 +379,9 @@ active_additional_packages: [], // all possible values - python_vers: ["3.9", "3.10", "3.11"], + python_vers: ["3.9", "3.10", "3.11", "3.12"], python_vers_stable: ["3.9", "3.10", "3.11"], - python_vers_nightly: ["3.10", "3.11"], + python_vers_nightly: ["3.10", "3.11", "3.12"], conda_cuda_vers: ["11", "12"], pip_cuda_vers: ["11.4 - 11.8", "12"], docker_cuda_vers: ["11.8", "12.0", "12.5"], @@ -664,8 +664,9 @@ getpipNotes() { var notes = []; var install_location_notes = "RAPIDS pip packages are hosted by NVIDIA
" + var version_string = this.getSupportedPythonVersions().map((v) => `${v}`).join(", ") notes = [...notes, install_location_notes, - 'pip installation supports Python 3.9, 3.10, and 3.11.
']; + `pip installation supports the following Python versions: ${version_string}.
`]; return notes.map(note => this.note_prefix + " " + note); }, @@ -695,6 +696,12 @@ return this.getpipCmdHtml(); return "Not implemented yet!"; }, + getSupportedPythonVersions() { + if (this.active_release === "Stable") { + return this.python_vers_stable; + } + return this.python_vers_nightly; + }, disableUnsupportedRelease(release) { var isDisabled = false; if (this.active_img_loc === "NGC" && this.active_method === "Docker" && release === "Nightly") isDisabled = true; @@ -706,12 +713,7 @@ return isDisabled; }, disableUnsupportedPython(python_version) { - var isDisabled = false; - if (this.active_release === "Stable") { - isDisabled = !this.python_vers_stable.includes(python_version) - } else if (this.active_release === "Nightly") { - isDisabled = !this.python_vers_nightly.includes(python_version) - } + var isDisabled = !this.getSupportedPythonVersions().includes(python_version) return isDisabled; }, disableUnsupportedImgType(type) { @@ -744,11 +746,10 @@ This handles that case, updating to the oldest Python version supported by the chosen release. */ - if (this.active_release === "Stable" && !this.python_vers_stable.includes(this.active_python_ver)) { - this.active_python_ver = this.python_vers_stable[0]; - } else if (this.active_release === "Nightly" && !this.python_vers_nightly.includes(this.active_python_ver)) { - this.active_python_ver = this.python_vers_nightly[0]; - } + var supported_python_versions = this.getSupportedPythonVersions() + if (!supported_python_versions.includes(this.active_python_ver)) { + this.active_python_ver = supported_python_versions[supported_python_versions.length - 1]; + } }, imgTypeClickHandler(e, type) { if (this.isDisabled(e.target)) return; diff --git a/install/install.md b/install/install.md index e0bbb0cbca9..703ab2c553a 100644 --- a/install/install.md +++ b/install/install.md @@ -97,8 +97,9 @@ ERROR: Could not find a version that satisfies the requirement cudf-cu12 (from v ERROR: No matching distribution found for cudf-cu12 ``` Check the suggestions below for possible resolutions: + - The pip index has moved from the initial experimental release! Ensure the correct `--extra-index-url=https://pypi.nvidia.com` -- Only Python versions 3.10 and 3.11 are supported +- Ensure you're using a Python version that RAPIDS supports (compare the values in the [the install selector](#selector) to the Python version reported by `python --version`). - RAPIDS pip packages require a recent version of pip that [supports PEP600](https://peps.python.org/pep-0600/){: target="_blank"}. Some users may need to update pip: `pip install -U pip`