coatless-quarto / pyodide

Quarto extension to enable interactive Python code cells in HTML documents using Pyodide
http://quarto.thecoatlessprofessor.com/pyodide/
53 stars 3 forks source link

Add ways to install non-Pyodide specific packages #3

Closed coatless closed 4 months ago

coatless commented 4 months ago

We're currently using pyodide.loadPackagesFromImports() to identify packages inside of each code cell and load them before running the code cell. This works well for packages available here:

https://pyodide.org/en/stable/usage/packages-in-pyodide.html

However, this list omits some data science classics like:

We probably should add micropip as part of the initial package load so that we can have:

import micropip
await micropip.install(
    'palmerpenguins'
)

More details at:

https://pyodide.org/en/stable/usage/loading-packages.html

Related to feedback in:

https://twitter.com/tomicapretto/status/1759766727951274332

coatless commented 4 months ago

Taken care of in #10, https://github.com/coatless-quarto/pyodide/commit/a07cb6a024c9c94669457111c75616edce6d80c6, and https://github.com/coatless-quarto/pyodide/commit/f83c77b4d681e430a4c8cfd4920198cebd9b579f