Added instructions on how to add additional packagaes

This commit is contained in:
Tom van Woudenberg 2024-03-07 08:59:39 +01:00
parent e35e16d0f0
commit b87b2e037c

View file

@ -46,3 +46,22 @@ With the extended functionality of live code, additional cell tags have been dev
- `thebe-init` directly starts running this cell as soon as the thebe live coding functionality starts.
- `thebe-remove-input-init`, as `thebe-init`, starts the cell directly as soon as the thebe live coding functionality starts. However, the input is not shown to the students (in static and interactive mode). The original `remove-input` tag will not work as it deletes the entire cell, so it can never be executed.
## Additional packages
The python kernel doesn't have all packages standard included. Some of the most used packages which are included are:
- `python`
- `numpy`
- `matplotlib`
- `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}
import micropip
await micropip.install("package_name")
```
This will install the packages from Pyodide.
If the packages are not included in Pyodide, you can use `pip:
```{python}
%pip install package_name
```