mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-13 14:55:51 +00:00
Added instructions on how to add additional packagaes
This commit is contained in:
parent
e35e16d0f0
commit
b87b2e037c
1 changed files with 19 additions and 0 deletions
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue