Packages

Python packages extend what you can do beyond the standard library. Libraries like pandas for data manipulation, matplotlib for plotting, and scikit-learn for machine learning are what make Python a powerhouse for data science. The Packages tab lets you install, browse, and manage packages right from your device using micropip and the PyPI ecosystem.

Browsing installed packages

The Packages tab shows all packages currently installed in your Pyodide environment. Each entry displays the package name and its version number. Packages that come pre-installed with Pyodide (like micropip, pyodide-http, and a handful of others) appear alongside anything you have installed yourself.

Installing a package

There are two ways to install packages:

From the Packages tab

  1. Open the Packages tab and make sure Installed is selected.
  2. In the Install Package via micropip section at the top, type the exact package name (for example, pandas or scikit-learn).
  3. Tap Install.

A progress indicator appears next to the input while the package downloads and installs. This usually takes a few seconds, depending on the package size and your internet connection. Dependencies are resolved and installed automatically, and the package appears in the Installed Packages list below.

From code

You can also install packages programmatically from a notebook cell or the Console:

import micropip
await micropip.install("pandas")

This is especially useful when you want to include installation steps at the top of a notebook so that anyone running it gets the right packages automatically.

Installing custom wheels

If you have a .whl file (a Python wheel) that is not on PyPI, you can install it directly:

  • From a URL: use await micropip.install("https://example.com/my_package-1.0-py3-none-any.whl") in a notebook cell or the Console.
  • From a local file: import the .whl file into your Documents folder via the Files tab, then install it by path.

This is useful for private packages or custom builds compiled for Pyodide/Emscripten.

Uninstalling packages

To remove a package you no longer need, swipe left on it in the installed list and tap the red Delete button. This removes the package from your environment. You can always reinstall it later.

Offline wheel caching

One of the most useful features of Pyodios is offline wheel caching. When you install a package, the wheel file is cached locally on your device. On subsequent app launches, your packages are automatically restored from the local cache, no internet connection required.

This means you can:

  • Install packages once while online, then use them offline indefinitely
  • Restart the app and have all your packages ready immediately
  • Work on an airplane, in the subway, or anywhere without Wi-Fi

The cache is managed automatically. You can see how much space it uses and clear it from Settings > Session.

Package bundles

If you are not sure which packages to start with, the app includes pre-built bundles that install a group of related packages in one tap. Open the menu (...) and choose Package Bundles to see the options:

Data Science: the essentials for data work. Includes pandas (DataFrames), numpy (numerical computing), scipy (scientific computing), and statsmodels (statistical models).

Visualization: everything you need for plotting. Includes matplotlib (classic plots), plotly (interactive charts), and seaborn (statistical visualization).

Machine Learning: focused on ML workflows. Includes scikit-learn (machine learning), numpy, and pandas as foundations.

Loading packages after installation

Installing a package makes it available on your device, but you still need to import it before you can use its functions. This is standard Python behavior: installing and importing are separate steps.

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

Packages persist across app restarts thanks to offline caching, but you will need to run your import statements each time you start a new session. A good practice is to put all your imports at the top of your scripts and notebooks so they run automatically.

Importing is a per-session action. If you restart Python or relaunch the app, you will need to import your packages again. Put your import statements at the top of your scripts so they run automatically.

A note about package availability

Not every package on PyPI is available in Pyodios. Because Python runs via Pyodide (WebAssembly compiled for the browser and iOS), packages need to meet one of these criteria:

  • Pure Python packages that contain only .py files work out of the box.
  • Packages with Pyodide/Emscripten builds that have been compiled for the WebAssembly platform are also available.

Packages that require C extensions, Fortran libraries, or system-level dependencies that have not been compiled for WASM will not work. The good news is that most popular data science, visualization, and machine learning packages are available:

Category Available packages
Data pandas, numpy, scipy, statsmodels
Visualization matplotlib, plotly, seaborn, bokeh
Machine Learning scikit-learn, xgboost
Text & NLP regex, beautifulsoup4, lxml
Utilities requests (via pyodide-http), jsonschema, pyyaml

You can check if a package is available by visiting the Pyodide packages list.

Packages are downloaded from PyPI and the Pyodide CDN and require an internet connection to install. Once installed and cached locally, they work offline.

Pull down on the package list to refresh it at any time.