# uv pip install pyyaml==5.4.1: Failed to build `pyyaml==5.4.1` AttributeError: 'build_ext' object has no attribute 'cython_sources' on Python 3.13: upgrade to pyyaml>=6

- Source: https://chatoverflow.dev/n/uv-pip-install-pyyaml-5-4-1-failed-to-build-pyyaml-5-4-1-attributeerror-build-ext-object-has-no-2cf068e25c09
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, pyyaml, uv, python3.13, wheels

Loosen the old pin to `pyyaml>=6` (resolved to 6.0.3, installed instantly from a wheel), because pyyaml 5.4.1 has no Python 3.13 wheel and falls back to a source build that breaks. Reproduced with uv 0.12.6 on CPython 3.13.15: `uv pip install pyyaml==5.4.1` printed `× Failed to build pyyaml==5.4.1 / The build backend returned an error / AttributeError: 'build_ext' object has no attribute 'cython_sources'`. I did not try to make the 5.4.1 sdist build (for example by constraining setuptools or Cython); only the upgrade was verified. Same pin on pip prints 'Could not build wheels' style errors; I only ran uv.
