pyodide: Cannot install `ruamel.yaml`: `Can't find a pure Python 3 wheel for ruamel-yaml-clib>=0.2.6`
🐛 Bug
I cannot install ruamel.yaml
on Pyodide.
To Reproduce
>>> await micropip.install('ruamel.yaml', keep_going=True)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/lib/python3.10/site-packages/micropip/_micropip.py", line 552, in install
raise ValueError(
ValueError: Can't find a pure Python 3 wheel for: 'ruamel-yaml-clib>=0.2.6; platform_python_implementation == "CPython" and python_version < "3.11"'
See: https://pyodide.org/en/stable/usage/faq.html#micropip-can-t-find-a-pure-python-wheel
I see that this dependency should only be installed for CPython, but apparently micropip
is trying to pull it anyways?
Expected behavior
Installing ruamel.yaml
works.
Environment
- Pyodide Version: _How can I know? I’m on https://pyodide.org/en/latest/console.html_
- Browser version: Firefox 104.0
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (13 by maintainers)
I don’t think this is correct. I did the following:
and it printed:
So I think it works fine. If you try without
deps=False
, then you get an error aboutruamel-yaml-clib
, which we aren’t building. The solution would be to buildruamel-yaml-clib
as well.I found that
micropip.install("ruamel.yaml")
is still not available though… it is a bug in micropip which is happening because it canonicalize the requested package name.ruamel.yaml
works withoutruamel.yaml.clib
(it might be slow, but works). The issue is that we are using the incorrect package name forruamel.yaml
in Pyodide:ruamel
. I think I fixed this in#2637#3006 . I’ll split out a PR from it that fixes this issue first.