diffusion-models-class icon indicating copy to clipboard operation
diffusion-models-class copied to clipboard

Colab setup fails: pinned `pyarrow==9.0.0` has no wheels for Py3.11+ → install cell breaks

Open John6666cat opened this issue 3 months ago • 0 comments

by GPT

Summary The Unit 1 “Introduction to Diffusers” notebook still installs pyarrow==9.0.0. On Colab (Python 3.11/3.12), that pin has no prebuilt wheels, so the first setup cell fails with “Failed building wheel for pyarrow”.

Where Unit 1 → Introduction to Diffusers → Step 1: Setup. The page shows:

%pip install -qq -U diffusers datasets transformers accelerate ftfy pyarrow==9.0.0
# source: https://huggingface.co/learn/diffusion-course/en/unit1/2

Steps to reproduce

  1. Open the “Introduction to Diffusers” notebook via the “Open in Colab” button.
  2. Run the first install cell.
  3. Observe error:
Building wheel for pyarrow (pyproject.toml) ... error
ERROR: Failed building wheel for pyarrow

Expected Install finishes and notebook proceeds.

Actual pyarrow==9.0.0 attempts a source build on Py3.11+ and fails because there is no wheel for that Python version.

Why this happens PyArrow 9.0.0 predates Python 3.11 wheels. On current Colab runtimes (3.11/3.12), pip cannot find a wheel and falls back to compiling, which fails in the base image.

Workarounds that fix it

  • Easiest: drop the pin entirely and let pip choose a compatible wheel:

    %pip install -qq -U diffusers datasets transformers accelerate ftfy
    %pip install -qq -U pyarrow  # only if datasets later asks for it
    
  • Or explicitly require a modern Arrow:

    %pip install -qq -U "pyarrow>=18"
    
  • Optional safeguard to avoid accidental source builds:

    %pip install -qq -U pyarrow --only-binary=:all:
    

Proposed change Update the install cell across course materials to either:

%pip install -qq -U diffusers datasets transformers accelerate ftfy

or:

%pip install -qq -U diffusers datasets transformers accelerate ftfy "pyarrow>=18"

This aligns with current Colab Python versions and modern wheel availability.

References

  • Course page still pins pyarrow==9.0.0 in Step 1 (accessed Oct 7, 2025). (Hugging Face)
  • Apache Arrow tracking: no Py3.11 wheels for pyarrow 9.0.0 (Oct 2022 → Jan 2023). (issues.apache.org)
  • Colab moved to newer Python by default in 2025, so users are on 3.11/3.12 and hit this pin. (GitHub)
  • Current PyArrow docs show support for modern Python versions, so a newer wheel is appropriate. (Apache Arrow)
  • Community report reproducing this exact failure on the course notebook in Colab. (discuss.huggingface.co)

John6666cat avatar Oct 07 '25 02:10 John6666cat