Skip to content

poetry install fails on Python 3.14 without a C toolchain — several locked pins ship no cp314 wheel #347

Closed

Description

@jiawenlai1109

Found while setting up a dev environment on a clean Ubuntu 22.04 box.

pyproject.toml declares requires-python = ">=3.14,<4.0" and CI tests only 3.14, but
poetry.lock pins several packages at versions that publish no cp314 manylinux wheel.
Poetry therefore falls back to the sdist, which needs cc/gcc. On a machine without a
C toolchain, poetry install aborts:

error: [Errno 2] No such file or directory: 'cc'

Directly observed on this machine (failed at these two, one after another):

package locked version
pandas 2.3.1
xxhash 3.5.0

Audited the whole lock (170 packages) against PyPI for a cp314 or abi3 linux/x86_64 wheel.
These have neither, so they also need a compiler:

package locked first version with a cp314 wheel group
markupsafe 3.0.2 — main
pandas 2.3.1 2.3.3 main
pyyaml 6.0.2 — main
xxhash 3.5.0 4.0.1 main
watchdog 6.0.0 — dev

(The last three I inferred from the PyPI file listing, not observed failing here,
because resolution stopped at pandas/xxhash first — so treat them as leads, not confirmed.)

psutil 7.0.0 and tornado 6.5.8 ship abi3 wheels and are fine; pywin32 is gated by a
sys_platform marker.

So CI is green only because ubuntu-latest runners preinstall gcc. Anyone following
docs/installation.md / docs/getting_started.md / Readme.md on a plain machine hits
this, and none of those files — nor docs/contributing.md — mention a compiler. My guess
is this is also why some long-open good first issues have no PRs attached: the dev
environment is the first wall.

What I verified works end to end

No root needed:

curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.14                     # 3.14.7
uv venv --python 3.14 ~/venvs/as14
source ~/venvs/as14/bin/activate
uv tool install --python 3.14 poetry==2.4.1
poetry update                              # refreshes the stale pins
poetry install                             # rc=0, wheels only, no compiler
OPENAI_API_KEY=sk-fake poetry run pytest . # 437 passed, 4 failed, 4 skipped

The 4 failures were mine to explain, not the repo's: I had just run a full
poetry update, which also bumped scikit-learn 1.7.2 → 1.9.1 and datasets 4.4.1 → 4.8.5,
and this box has no route to HuggingFace or Google TTS. Under the committed lock CI is green.

Two things that could be done, your call

  1. poetry update pandas xxhash is not enough — 5 pins are involved, so a narrow bump
    drags their trees along. Whatever you prefer over a full poetry update is fine by me.
  2. Cheaper and unarguable: document the prerequisite (a C toolchain, or the uv recipe
    above) in docs/installation.md / docs/contributing.md. I can send that as a docs PR
    if useful.

Environment details: Ubuntu 22.04.5, x86_64, no build-essential, Poetry 2.4.1 (same as
the CI pin).


---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions