From cdf88919e0c1b95f3f34c1babd34c8cff3ff3989 Mon Sep 17 00:00:00 2001 From: Youngsik Yang Date: Mon, 4 May 2026 21:38:13 +0900 Subject: [PATCH] [Docs] Fix python specifiers in tutorials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tutorial pages prescribe 'python=3.10.0', which has a CPython bug (python/cpython#89683) that leaves PyTorch's LeafSpec's init=False fields uninitialized. run_decompositions() in ExecuTorch deepcopies the LeafSpec nodes and crashes, so any model export attempt fails unconditionally on Python 3.10.0. The CI pipeline uses PYTHON_VERSION=3.10 in .ci/docker/build.sh, which conda resolves to the latest 3.10.x (currently 3.10.16) — unaffected by the bug. This fix aligns the docs with CI. --- docs/README.md | 2 +- docs/source/raspberry_pi_llama_tutorial.md | 2 +- docs/source/using-executorch-building-from-source.md | 2 +- examples/raspberry_pi/setup.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index 845267b32f6..da9e6a6a5df 100644 --- a/docs/README.md +++ b/docs/README.md @@ -52,7 +52,7 @@ To build the documentation locally: Or a Conda environment: ```bash - conda create -yn executorch python=3.10.0 && conda activate executorch + conda create -yn executorch python=3.10 && conda activate executorch ``` 1. Install dependencies: diff --git a/docs/source/raspberry_pi_llama_tutorial.md b/docs/source/raspberry_pi_llama_tutorial.md index 1e886db694a..46d6e3d4fb0 100644 --- a/docs/source/raspberry_pi_llama_tutorial.md +++ b/docs/source/raspberry_pi_llama_tutorial.md @@ -65,7 +65,7 @@ cd executorch ```bash # Create conda environment -conda create -yn executorch python=3.10.0 +conda create -yn executorch python=3.10 conda activate executorch # Upgrade pip diff --git a/docs/source/using-executorch-building-from-source.md b/docs/source/using-executorch-building-from-source.md index 7ca8cdd6352..4508430a181 100644 --- a/docs/source/using-executorch-building-from-source.md +++ b/docs/source/using-executorch-building-from-source.md @@ -45,7 +45,7 @@ portability details. ```bash git clone -b viable/strict https://github.com/pytorch/executorch.git cd executorch - conda create -yn executorch python=3.10.0 + conda create -yn executorch python=3.10 conda activate executorch ``` diff --git a/examples/raspberry_pi/setup.sh b/examples/raspberry_pi/setup.sh index 894a8365e6e..3bf34788d63 100755 --- a/examples/raspberry_pi/setup.sh +++ b/examples/raspberry_pi/setup.sh @@ -245,7 +245,7 @@ setup_environment() { # Check if conda is available if command -v conda &> /dev/null; then log_info "Creating conda environment..." - conda create -yn executorch python=3.10.0 + conda create -yn executorch python=3.10 eval "$(conda shell.bash hook)" conda activate executorch log_success "Created and activated conda environment: executorch"