From 61e6aa9b4bd080c27739ae495a83983ced354e52 Mon Sep 17 00:00:00 2001 From: Tom van Woudenberg Date: Wed, 13 Mar 2024 16:45:17 +0100 Subject: [PATCH] fixed python syntax --- book/features/live_code.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/book/features/live_code.md b/book/features/live_code.md index ec52743..a431e7a 100644 --- a/book/features/live_code.md +++ b/book/features/live_code.md @@ -75,13 +75,16 @@ The python kernel doesn't have all packages standard included. Some of the most - `ipywidgets` If you'd like to install more package, you can do so by added a codecell (preferably hidden using `thebe-remove-input-init`) with the following command: -```{python} + +```python import micropip await micropip.install("package_name") ``` + This will install the packages: Micropip will look at the Pyodide package index, but also at the general PyPi index. If a package is pure python (i.e. no C extensions), then it can also be used by Pyodide. If the packages are not included in Pyodide, you can use `pip: -```{python} + +```python %pip install package_name ```