Closed mmathys closed 1 year ago
AFAIU yaml.c
is automatically generated by cython
. In order to get yaml/_yaml.c
you need to have cython installed. (For instance, pip install cython
.)
Hi there, We're also getting same issue in our azure CI-CD pipelines. Please find the error logs below:
Searching for pyYAML>=6.0.0
Reading https://pypi.org/simple/pyYAML/
Downloading https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz#sha256=68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2
Best match: PyYAML 6.0
Processing PyYAML-6.0.tar.gz
Writing /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/easy_install-9fzd5cr8/PyYAML-6.0/setup.cfg
Running PyYAML-6.0/setup.py -q bdist_egg --dist-dir /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/easy_install-9fzd5cr8/PyYAML-6.0/egg-dist-tmp-ks3f36u2
warning: no files found matching 'README'
clang: error: no such file or directory: 'yaml/_yaml.c'
clang: error: no input files
Error compiling module, falling back to pure Python
zip_safe flag not set; analyzing archive contents...
No eggs found in /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/easy_install-9fzd5cr8/PyYAML-6.0/egg-dist-tmp-ks3f36u2 (setup script problem?)
error: The 'pyYAML>=6.0.0' distribution was not found and is required by devops-toolbox
##[error]Bash exited with code '1'.
I've tried installing cython in our pipeline but it didn't work.
Could you please help?
No idea what tooling or version of Python you're using to install there, but it looks positively ancient and clearly doesn't support modern Python packages well, as it's directly invoking setup.py
and using easy_install
, both of which have been deprecated for years and will make your life difficult. If you use a recent-ish Python with a modern pip
, all should "just work", but can't help you with obsolete tooling.
Closing this issue as "working as designed".
... and for the OP, if still struggling with this: we weren't able to support the Apple-provided Python 3.8 with our Apple Silicon wheels, but things will generally build fine on that Python if you have a modern pip
and the necessary compilers/libyaml headers installed. It looks like you've got a similar problem- using some kind of ancient tooling that's not PEP517-aware (since it's trying to build an egg instead of a wheel)- use a modern version of pip and/or anything newer than the Apple-provided Python 3.8 to install and it should build everything properly.
Using:
throws me the following error:
Using: macOS 13.3.1 on M1, Python 3.8.
Also, why is
setup.py
searching foryaml/_yaml.c
? It doesn't seem to exist in the repo.