From 8080b24097e7140f4ef30a86d8fb468ee4b78d62 Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 21 Feb 2024 16:43:51 -0800 Subject: [PATCH] Update MacOS Python to 3.12 --- CMakeLists.txt | 2 +- doc/_pages/from_source.md | 8 ++++---- doc/_pages/installation.md | 6 +++--- doc/_pages/pip.md | 2 +- setup/mac/binary_distribution/Brewfile | 2 +- setup/mac/binary_distribution/install_prereqs.sh | 6 +++--- setup/mac/source_distribution/install_prereqs.sh | 8 ++++---- setup/mac/source_distribution/requirements-test-only.txt | 1 - tools/workspace/python/repository.bzl | 2 +- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52983b7e30ed..99c62c0d9b70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,7 +225,7 @@ set(CMAKE_CXX_STANDARD 17) if(APPLE) # The macOS python version should match what's listed in both the # tools/workspace/python/repository.bzl and doc/_pages/installation.md. - set(SUPPORTED_PYTHON_VERSION 3.11) + set(SUPPORTED_PYTHON_VERSION 3.12) else() if(UNIX_DISTRIBUTION_CODENAME STREQUAL noble) set(SUPPORTED_PYTHON_VERSION 3.11) diff --git a/doc/_pages/from_source.md b/doc/_pages/from_source.md index fd259776fc8a..b3dcfdb06450 100644 --- a/doc/_pages/from_source.md +++ b/doc/_pages/from_source.md @@ -15,9 +15,9 @@ officially supports: | Operating System ⁽¹⁾ | Architecture | Python ⁽²⁾ | Bazel | CMake | C/C++ Compiler ⁽³⁾ | Java | |------------------------------------|--------------|------------|-------|-------|------------------------------|-------------------------------| | Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 | 6.4 | 3.22 | GCC 11 (default) or Clang 12 | OpenJDK 11 | -| macOS Monterey (12) | x86_64 | 3.11 | 6.4 | 3.25 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | -| macOS Ventura (13) | arm64 | 3.11 | 6.4 | 3.26 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | -| macOS Sonoma (14) | arm64 | 3.11 | 6.4 | 3.28 | Apple LLVM 15 (Xcode 15) | AdoptOpenJDK 16 (HotSpot JVM) | +| macOS Monterey (12) | x86_64 | 3.12 | 6.4 | 3.25 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | +| macOS Ventura (13) | arm64 | 3.12 | 6.4 | 3.26 | Apple LLVM 14 (Xcode 14) | AdoptOpenJDK 16 (HotSpot JVM) | +| macOS Sonoma (14) | arm64 | 3.12 | 6.4 | 3.28 | Apple LLVM 15 (Xcode 15) | AdoptOpenJDK 16 (HotSpot JVM) | "Official support" means that we have Continuous Integration test coverage to notice regressions, so if it doesn't work for you then please file a bug report. @@ -158,5 +158,5 @@ export PYTHONPATH=${PWD}/install/lib/python3.10/site-packages:${PYTHONPATH} ```bash cd drake-build -export PYTHONPATH=${PWD}/install/lib/python3.11/site-packages:${PYTHONPATH} +export PYTHONPATH=${PWD}/install/lib/python3.12/site-packages:${PYTHONPATH} ``` diff --git a/doc/_pages/installation.md b/doc/_pages/installation.md index ab8d1ca52025..c1c68514e250 100644 --- a/doc/_pages/installation.md +++ b/doc/_pages/installation.md @@ -23,9 +23,9 @@ officially supports: |------------------------------------|--------------|------------|-----------------| | Ubuntu 22.04 LTS (Jammy Jellyfish) | x86_64 | 3.10 ⁽³⁾ | March 2026 | | Ubuntu 24.04 LTS (Noble Numbat) | TBD ⁽⁵⁾ | TBD ⁽⁵⁾ | March 2028 | -| macOS Monterey (12) | x86_64 | 3.11 | October 2023 | -| macOS Ventura (13) | arm64 | 3.11 | October 2024 | -| macOS Sonoma (14) | arm64 | 3.11 | October 2025 | +| macOS Monterey (12) | x86_64 | 3.12 | October 2023 | +| macOS Ventura (13) | arm64 | 3.12 | October 2024 | +| macOS Sonoma (14) | arm64 | 3.12 | October 2025 | "Official support" means that we have Continuous Integration test coverage to notice regressions, so if it doesn't work for you then please file a bug report. diff --git a/doc/_pages/pip.md b/doc/_pages/pip.md index d1a8df3defb4..c520493cecab 100644 --- a/doc/_pages/pip.md +++ b/doc/_pages/pip.md @@ -57,7 +57,7 @@ published nightly at a [PEP 503](https://peps.python.org/pep-0503/) index url [https://drake-packages.csail.mit.edu/whl/nightly/](https://drake-packages.csail.mit.edu/whl/nightly/). - Nightly wheel version numbers are created as `0.0.YYYYMMDD`, e.g., - `0.0.20230914` for Septemper 14th, 2023. + `0.0.20240221` for February 21st, 2024. - Nightly wheel packages are retained for 56 days from their date of creation, and drop out of the index after 48 days. diff --git a/setup/mac/binary_distribution/Brewfile b/setup/mac/binary_distribution/Brewfile index 1d9eb86c63df..501449fd2519 100644 --- a/setup/mac/binary_distribution/Brewfile +++ b/setup/mac/binary_distribution/Brewfile @@ -15,7 +15,7 @@ brew 'ipopt' brew 'numpy' brew 'openblas' brew 'pkg-config' -brew 'python@3.11' +brew 'python@3.12' brew 'spdlog' brew 'xz' brew 'yaml-cpp' diff --git a/setup/mac/binary_distribution/install_prereqs.sh b/setup/mac/binary_distribution/install_prereqs.sh index 6845e58e16a9..0da4fe6ac1cb 100755 --- a/setup/mac/binary_distribution/install_prereqs.sh +++ b/setup/mac/binary_distribution/install_prereqs.sh @@ -62,9 +62,9 @@ fi brew bundle --file="${BASH_SOURCE%/*}/Brewfile" --no-lock -if ! command -v pip3.11 &>/dev/null; then - echo 'ERROR: pip3.11 is NOT installed. The post-install step for the python@3.11 formula may have failed.' >&2 +if ! command -v pip3.12 &>/dev/null; then + echo 'ERROR: pip3.12 is NOT installed. The post-install step for the python@3.12 formula may have failed.' >&2 exit 2 fi -pip3.11 install -r "${BASH_SOURCE%/*}/requirements.txt" +pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements.txt" diff --git a/setup/mac/source_distribution/install_prereqs.sh b/setup/mac/source_distribution/install_prereqs.sh index d18d49c3dbaf..b91f4845c40b 100755 --- a/setup/mac/source_distribution/install_prereqs.sh +++ b/setup/mac/source_distribution/install_prereqs.sh @@ -49,13 +49,13 @@ if [[ "${with_test_only}" -eq 1 ]]; then brew bundle --file="${BASH_SOURCE%/*}/Brewfile-test-only" --no-lock fi -if ! command -v pip3.11 &>/dev/null; then - echo 'ERROR: pip3.11 is NOT installed. The post-install step for the python@3.11 formula may have failed.' >&2 +if ! command -v pip3.12 &>/dev/null; then + echo 'ERROR: pip3.12 is NOT installed. The post-install step for the python@3.12 formula may have failed.' >&2 exit 2 fi -pip3.11 install -r "${BASH_SOURCE%/*}/requirements.txt" +pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements.txt" if [[ "${with_test_only}" -eq 1 ]]; then - pip3.11 install -r "${BASH_SOURCE%/*}/requirements-test-only.txt" + pip3.12 install --break-system-packages -r "${BASH_SOURCE%/*}/requirements-test-only.txt" fi diff --git a/setup/mac/source_distribution/requirements-test-only.txt b/setup/mac/source_distribution/requirements-test-only.txt index 2402931e4ce9..d93dccfb4520 100644 --- a/setup/mac/source_distribution/requirements-test-only.txt +++ b/setup/mac/source_distribution/requirements-test-only.txt @@ -1,5 +1,4 @@ flask -jupyter six u-msgpack-python websockets diff --git a/tools/workspace/python/repository.bzl b/tools/workspace/python/repository.bzl index de5f402537d5..ed5f4be2b107 100644 --- a/tools/workspace/python/repository.bzl +++ b/tools/workspace/python/repository.bzl @@ -237,7 +237,7 @@ interpreter_path_attrs = { "macos_interpreter_path": attr.string( # The version listed here should match what's listed in both the root # CMakeLists.txt and doc/_pages/installation.md. - default = "{homebrew_prefix}/bin/python3.11", + default = "{homebrew_prefix}/bin/python3.12", ), }