Skip to content

Commit 6b3e64e

Browse files
committed
interactive widgets can't work in pyodide environment. Remove them and update the notebook to suit.
1 parent 9b35e7a commit 6b3e64e

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
4747
- name: Build JupyterLite site
4848
run: |
49-
pip install jupyterlite-core jupyterlite-pyodide-kernel jupyter-server ipympl
49+
pip install jupyterlite-core jupyterlite-pyodide-kernel jupyter-server
5050
cd lite && jupyter lite build --output-dir ../docs/build/html/lite
5151
5252
- uses: actions/upload-pages-artifact@v3

lite/files/intro.ipynb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"\n",
3131
" await micropip.install([\n",
3232
" \"opencv-python\",\n",
33-
" \"ipympl\",\n",
3433
" \"spatialmath-python\",\n",
3534
" \"pgraph-python\",\n",
3635
" \"ansitable\",\n",
@@ -61,7 +60,7 @@
6160
"metadata": {},
6261
"outputs": [],
6362
"source": [
64-
"%matplotlib widget\n",
63+
"%matplotlib inline\n",
6564
"import matplotlib.pyplot as plt\n",
6665
"\n",
6766
"from machinevisiontoolbox import Image\n",
@@ -88,6 +87,16 @@
8887
"mona.disp()"
8988
]
9089
},
90+
{
91+
"cell_type": "markdown",
92+
"id": "73b8a6e9",
93+
"metadata": {},
94+
"source": [
95+
"<div class=\"alert alert-info\">\n",
96+
"<strong>Note:</strong> In this environment it is not possible to examine pixel values by hovering the mouse cursor over an image. This a limitation of Matplotlib in a Pyodide Web Worker.\n",
97+
"</div>"
98+
]
99+
},
91100
{
92101
"cell_type": "markdown",
93102
"id": "43219088",

0 commit comments

Comments
 (0)