docs: emphasize Pyodide cannot install additional libraries, update complete package list

This commit is contained in:
DrMelone
2026-03-08 02:48:13 +01:00
parent d17fa6bace
commit ccc666dc17
2 changed files with 23 additions and 18 deletions

View File

@@ -37,8 +37,10 @@ Pyodide runs Python in the browser via WebAssembly. It is sandboxed and safe for
Pyodide works well for **text analysis, hash computation, chart generation, file processing**, and other self-contained tasks. Chart libraries like matplotlib produce base64-encoded images that Open WebUI automatically captures, uploads as files, and injects direct image links into the output — so models can display charts directly in chat without any extra setup.
:::
:::warning Not suited for heavy workloads
Pyodide runs Python via WebAssembly inside the browser, which is **significantly slower** than native Python execution. Large datasets, complex computations, ML model training, and CPU-intensive tasks will be noticeably slow or may hit memory limits. Additionally, many Python packages that rely on C extensions, system calls, or native binaries are **not available** in Pyodide — the library ecosystem is a limited subset of what a full Python environment offers. For demanding workloads, use **Open Terminal** instead, which provides full native performance and unrestricted package access inside a Docker container.
:::warning Best for basic analysis only
Pyodide runs Python via WebAssembly inside the browser. The AI **cannot install additional libraries** beyond the small fixed set listed below — any code that imports an unsupported package will fail. Execution is also **significantly slower** than native Python, and large datasets or CPU-intensive tasks may hit browser memory limits. Pyodide is best suited for **basic file analysis, simple calculations, text processing, and chart generation**. For anything more demanding, use **Open Terminal** instead, which provides full native performance and unrestricted package access inside a Docker container.
Available libraries: micropip, requests, beautifulsoup4, numpy, pandas, matplotlib, seaborn, scikit-learn, scipy, regex, sympy, tiktoken, pytz, and the Python standard library. **Nothing else can be installed at runtime.**
:::
:::note Mutually exclusive with Open Terminal

View File

@@ -141,25 +141,28 @@ The Pyodide worker is **persistent** — it is created once and reused across co
### Supported Libraries
Pyodide includes the following pre-configured packages:
Pyodide includes the following packages, which are auto-detected from import statements and loaded on demand:
- micropip
- packaging
- requests
- beautifulsoup4
- numpy
- pandas
- matplotlib
- scikit-learn
- scipy
- regex
| Package | Use case |
|---------|----------|
| micropip | Package installer (internal use) |
| requests | HTTP requests |
| beautifulsoup4 | HTML/XML parsing |
| numpy | Numerical computing |
| pandas | Data analysis and manipulation |
| matplotlib | Chart and plot generation |
| seaborn | Statistical data visualization |
| scikit-learn | Machine learning |
| scipy | Scientific computing |
| regex | Advanced regular expressions |
| sympy | Symbolic mathematics |
| tiktoken | Token counting for LLMs |
| pytz | Timezone handling |
:::note
Packages not pre-compiled in Pyodide cannot be installed at runtime. For additional packages, consider using Open Terminal or forking Pyodide to add custom packages.
:::
The Python standard library is also fully available (json, csv, math, datetime, os, io, etc.).
:::warning Performance Limitations
Pyodide executes Python via WebAssembly in the browser, which is **significantly slower** than native execution. Heavy computations, large dataset processing, ML training, and memory-intensive tasks may be slow, unresponsive, or hit browser memory limits. Many packages that depend on C extensions or system-level libraries are also unavailable. For demanding workloads, use **[Open Terminal](/features/chat-conversations/chat-features/code-execution#open-terminal)** instead — it provides full native performance and unrestricted package access.
:::warning No runtime installation
The AI **cannot install additional libraries** beyond the list above. Any code that imports an unsupported package will fail with an import error. Packages that require C extensions, system calls, or native binaries (e.g., torch, tensorflow, opencv, psycopg2) are **not available** and cannot be made available in Pyodide. Pyodide is best suited for **basic file analysis, simple calculations, text processing, and chart generation**. For full Python package access, use **[Open Terminal](/features/chat-conversations/chat-features/code-execution#open-terminal)** instead.
:::
## Persistent File System