Skip to content

Python Packages

Python Code block is using Pyodide which behaves slightly different compared to CPython. Pyodide comes with many built-in packages, e.g., numpy, pandas, matplotlib. So they are ready to be loaded and used.
For more details please see Pyodide - Loading packages.

How to install Python Package

In case you want to use a packages that is not pre-installed, be aware that you can install only pure Python wheels or binary wasm32/emscripted wheels. This can be done using micropip. For example if you want to install plotly you have to do:

import micropip
await micropip.install('plotly');

For a fully working example see Python and Plotly.
For more details please see Pyodide - Installing packages.

How to install requests package

requests package is available in inseri core ≥ 0.3.5. If you use an older older version, please update.

For a fully working example see Python and Requests Package.