I noticed I was getting this error when trying to install pyyaml with Python 3.12:
File "<string>", line 204, in get_source_files
File "/home/james/.cache/uv/builds-v0/.tmppqsGTB/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
raise AttributeError(attr)
AttributeError: cython_sources File "<string>", line 204, in get_source_files
File "/home/james/.cache/uv/builds-v0/.tmppqsGTB/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
raise AttributeError(attr)
AttributeError: cython_sources
It seems that Python 3.12 breaks cython compatibility so a number of packages don’t work. I fixed the problem by downgrading Python to 3.11
References
https://github.com/yaml/pyyaml/issues/724 https://stackoverflow.com/questions/77490435/attributeerror-cython-sources