-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I'm trying a very simple example with matplotlib to make a plot in the pyodide environment. TL;DR, I get this error with matplotlib:
cannot import name 'maxdict' from 'matplotlib.cbook' (/lib/python3.12/site-packages/matplotlib/cbook.py)
Here's more detail about what I did.
I wrote a qmd file with the following content and ran it with quarto preview:
---
title: "test quarto live"
format: live-html
---
The embedded code must run from a server, not an html file, so use `quarto preview`
This is a Quarto website testing the https://github.com/r-wasm/quarto-live extension.
To learn more about Quarto websites visit <https://quarto.org/docs/websites>.
```{pyodide}
import matplotlib.pyplot as plt
import matplotlib
print(matplotlib.__version__)
fig, ax = plt.subplots()
#ax.plot([1,3,2])
```
Here's a screenshot of the output I get:
I installed quarto-live with
quarto add r-wasm/quarto-liveThe _extension.yml file says version 0.2.1-dev
Here's the output of quarto check
Quarto 1.6.37
[✓] Checking environment information...
Quarto cache location: /home/apn/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.37
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2019
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.8.3
Path: /home/apn/sw/bin/python3
Jupyter: 4.10.0
Kernels: julia-1.8, python3
(\) Checking Jupyter engine render....[IPKernelApp] ERROR | No such comm target registered: quarto_kernel_setup
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: (None)
rmarkdown: (None)
The knitr package is not available in this R installation.
Install with install.packages("knitr")
The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")
the matplotlib version installed with pyodide and quarto-live appears to be 3.8.4. This issue with matplotlib indicates that maxdict was deprecated and removed with Matplotlib v 3.6, so this sounds like a versioning issue, but I'm completely new to quarto-live and pyodide and don't know much about how to debug anything,and I don't know how versioning is managed, so this may be an upsteam issue with pyodide.
