Skip to main content


Run in your Browser

Skip the setup:

Introduction to Metaflow

Try it out directly in your browser

Open in Sandbox

Run on your own Infrastructure

To run this tutorial locally or with your own Metaflow deployment, you will need to clone the repository, and then install dependencies using an environment manager of your choice. In the repository you will find the necessary dependencies in a env.yml file for conda. You can install them by following these instructions.

1Clone This Repository

To get set up for this tutorial, clone this repository. You can do so by executing the following in your terminal:

git clone

2Install Dependencies

To run these tutorials you need to install a few packages. The next two sections show two options for how you can do this using a) conda or b) pip.

2aInstall env.yml with Conda

Conda is an open source package management system and environment management system.

If you want to use conda do not already have it you should install the Anaconda distribution of Python 3 appropriate for your computer.

We suggest you try mamba instead of conda because it can be significantly faster. You can install mamba from mambaforge or from an existing conda installation. The following shows the latter of these two paths in addition to how to create and activate your environment:

cd tutorials/intro-to-mf
conda install mamba -n base -c conda-forge
mamba env create -f env.yml
conda activate intro-to-mf

If you prefer not to use mamba, you can also use conda:

cd tutorials/intro-to-mf
conda env create -f env.yml
conda activate intro-to-mf

2bInstall requirements.txt with venv

If you prefer to use venv then you can create and activate a new environment:

cd tutorials/intro-to-mf
python -m venv ./intro-to-mf-env
source ./intro-to-mf-env/bin/activate

Then, if you have a Mac with M1 processor:

pip install -r requirements-macM1.txt


pip install -r requirements.txt

If you were able to complete either 2a or 2b you are good to move on to the tutorials!

3Running the Tutorials

There are many ways you can create and use Metaflow flows. In this first tutorial the primary actions to consider include: writing, editing, and running flows.

It is common to use your favorite text editor to write and edit Metaflow code and to run the flows from the command line. In the following videos, you can see this demonstrated in two ways. The first video shows how to use VSCode as a place to write and edit code while using the terminal to run commands. The second video shows how to use Jupyter Lab to write, edit, and run Metaflow code.

3aMetaflow Tutorials with VSCode

3bMetaflow Tutorials with Jupyter Lab