huggingface / huggingface/diffusion-models-class

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

Open
#98 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
492
PR merge metrics
No merged PRs in 30d

Description

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:

```bash
%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:

```bash
%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:

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

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

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

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

or:

```bash
%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](https://huggingface.co/learn/diffusion-course/en/unit1/2 "Introduction to Diffusers - Hugging Face Diffusion Course"))
* Apache Arrow tracking: no Py3.11 wheels for pyarrow 9.0.0 (Oct 2022 → Jan 2023). ([issues.apache.org](https://issues.apache.org/jira/browse/ARROW-18153 "[ARROW-18153] [Python] Python 3.11 no wheels for pyarrow 9.0.0 - ASF JIRA"))
* Colab moved to newer Python by default in 2025, so users are on 3.11/3.12 and hit this pin. ([GitHub](https://github.com/googlecolab/colabtools/issues/5071 "GitHub · Where software is built"))
* Current PyArrow docs show support for modern Python versions, so a newer wheel is appropriate. ([Apache Arrow](https://arrow.apache.org/docs/python/install.html "Installing PyArrow — Apache Arrow v21.0.0"))
* Community report reproducing this exact failure on the course notebook in Colab. ([discuss.huggingface.co](https://discuss.huggingface.co/t/diffusers-course-introduction-to-diffusers-setup-fails/156044 "Diffusers course introduction-to-diffusers setup fails"))

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.