mirror of
https://github.com/TeachBooks/manual.git
synced 2026-11-12 22:35:51 +00:00
Merge branch 'main' into 'publish'
Additional packages in sphinx-thebe See merge request interactivetextbooks-citg/jupyter-book-manual!55
This commit is contained in:
commit
109dd72ea3
1 changed files with 23 additions and 1 deletions
|
|
@ -62,4 +62,26 @@ With the extended functionality of live code, additional cell tags have been dev
|
|||
- `disable-execution-page` disables the ability to execute the entire page. This might be useful if you use python code for creating a page, but the code is not part of the actual content of the book.
|
||||
- `auto-execute-page` automatically starts the thebe live coding functionality whenever the page is opened. This is particularly useful if you're using widgets on a page.
|
||||
- `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.
|
||||
- `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`
|
||||
- `scipy`
|
||||
- `sympy`
|
||||
- `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: 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}
|
||||
%pip install package_name
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue