-
Notifications
You must be signed in to change notification settings - Fork 22
/
README.md
149 lines (103 loc) · 4.01 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# jupyterlite-pyodide-kernel
> A Python kernel for [JupyterLite](https://jupyterlite.rtfd.io) powered by
> [Pyodide](https://pyodide.org),
[![ci-badge]][ci] [![lite-badge]][lite] [![docs-badge]][docs]
[ci-badge]: https://github.com/jupyterlite/pyodide-kernel/workflows/Build/badge.svg
[lite-badge]: https://jupyterlite.rtfd.io/en/latest/_static/badge.svg
[lite]: https://jupyterlite-pyodide-kernel.rtfd.io/en/latest/_static
[ci]: https://github.com/jupyterlite/pyodide-kernel/actions?query=branch%3Amain
[docs-badge]:
https://readthedocs.org/projects/jupyterlite-pyodide-kernel/badge/?version=latest
[docs]: https://jupyterlite-pyodide-kernel.readthedocs.io/en/latest/?badge=latest
## Requirements
- `python >=3.8`
### Compatibility
| status | `jupyterlite-pyodide-kernel` | `jupyterlite-core` | `jupyterlab` | `notebook` | `retrolab` |
| :---------------------------: | :--------------------------: | :----------------: | :----------: | :--------: | ---------- |
| [alpha](#prerelease-versions) | `0.2.*` | `0.2.*` | `4.0.*` | `7.0.*` | - |
| stable | `0.1.*` | `0.1.*` | `3.5.*` | - | `0.3.*` |
Installing the matching version of JupyterLab with your package manager can help ensure
matching labextension assets and kernel dependencies, even though this kernel does not
yet work in a full, `jupyter_server`-hosted client such as JupyterLab or Notebook.
## Install
To install the Pyodide kernel labextension and the CLI addons for `jupyter lite`, run:
```bash
pip install jupyterlite-pyodide-kernel
```
or with `conda`, `mamba`, `micromamba`, etc.
```bash
conda install -c conda-forge jupyterlite-pyodide-kernel
```
> For more options see the [development install](#development-install) or [contributing
> guide][contrib].
## Usage
Build a JupyterLite site:
```bash
jupyter lite build
```
Some new CLI options are also available:
```bash
jupyter lite --help
```
This should show something like this:
```bash
--piplite-wheels=<typedtuple-item-1>...
Local paths or URLs of piplite-compatible wheels to copy and index
Default: ()
Equivalent to: [--PipliteAddon.piplite_urls]
--pyodide=<Unicode>
Local path or URL of a pyodide distribution tarball
Default: ''
Equivalent to: [--PyodideAddon.pyodide_url]
```
## Learn more
⚠️ The documentation for advanced configuration is available from the main JupyterLite
documentation site:
- [configuring]
- [command line interface][cli]
[configuring]:
https://jupyterlite.readthedocs.io/en/latest/howto/index.html#configuring-the-python-environment
[cli]: https://jupyterlite.readthedocs.io/en/latest/reference/cli.html
## Uninstall
To remove the extension, run:
```bash
pip uninstall jupyterlite-pyodide-kernel # or howver you installed it
```
## Prerelease Versions
To install pre-release versions with `pip`:
```bash
pip install --upgrade --pre jupyterlite-pyodide-kernel
```
Or, similarly for the `conda` ecosystem, for `alpha` packages:
```bash
conda install \
-c conda-forge/label/jupyterlite_core_alpha \
-c conda-forge/label/jupyterlite_pyodide_kernel_alpha \
-c conda-forge \
jupyterlite-pyodide-kernel
```
> Note: `_beta` and `_rc` packages would follow a similar channel naming convention
## Development Install
Below is an short overview of getting up and running quickly. Please see the
[contributing guide][contrib] for full details.
### Development Requirements
**Recommended** a Python virtual environment provided by a tool of choice, e.g. one of:
- `virtualenv`
- `mamba`
- `conda`
Ensure the local development environment has:
- `git`
- `nodejs 20`
- `python >=3.8`
### Development Quick Start
```bash
git clone https://github.com/jupyterlite/pyodide-kernel
cd pyodide-kernel
npm run quickstart
```
Then, serve the built demo site, documentation, and test reports with Python's built-in
HTTP server:
```bash
jlpm serve
```
[contrib]: https://github.com/jupyterlite/pyodide-kernel/blob/main/CONTRIBUTING.md