import micropip
>>> await micropip.install('regex')
>>> package_list = micropip.list()
>>> print(package_list)
Name | Version | Source
----------------- | -------- | -------
regex | 2021.7.6 | pyodide
>>> "regex" in package_list
True