micropip
micropip copied to clipboard
Optional dependency ignored by micropip
🐛 Bug
When install optional dependency micropip.install(['pydantic[email]'])
(defined here), however, installing the dependency manually works.
To Reproduce
Go to https://pyodide.org/en/stable/console.html
Welcome to the Pyodide terminal emulator 🐍
Python 3.11.2 (main, Jun 18 2023 00:11:52) on WebAssembly/Emscripten
Type "help", "copyright", "credits" or "license" for more information.
>>> import micropip
await micropip.install(['pydantic[email]'])
import email_validator
Traceback (most recent call last):
File "<console>", line 1, in <module>
ModuleNotFoundError: No module named 'email_validator'
>>> import micropip
await micropip.install(['pydantic[email]', 'email-validator>=2.0.0'])
import email_validator
>>>
Expected behavior
It should work by just doing micropip.install(['pydantic[email]'])
.
Environment
>>> import pyodide
>>> pyodide.__version__
'0.23.3'