How to install ZenML

This is an older version of the ZenML documentation. To read and view the latest version please visit this up-to-date URL.


ZenML is a Python package that can be installed directly via pip:

pip install zenml

Please note that ZenML currently only supports Python 3.7, 3.8, and 3.9. Please adjust your Python environment accordingly.

Virtual Environments

We highly encourage you to install ZenML in a virtual environment. At ZenML, We like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual environments.

As mentioned above, make sure that your virtual environment uses one of the supported Python versions.

Verifying Installations

Once the installation is completed, you can check whether the installation was successful through:


zenml version


import zenml

If you would like to learn more about the current release, please visit our PyPi package page.

Known installation issues for M1 Mac Users

If you have a M1 Mac machine and you are encountering an error while trying to install ZenML, please try to setup brew and pyenv with Rosetta 2 and then install ZenML. The issue arises because some of the dependencies aren’t fully compatible with the vanilla ARM64 Architecture. The following links may be helpful (Thank you Reid Falconer!):

Running with Docker

zenml is also available as a Docker image hosted publicly on DockerHub. Use the following command to get started in a bash environment with zenml available:

docker run -it zenmldocker/zenml /bin/bash

Installing Develop

If you want to use the bleeding edge of ZenML that has not even been released yet, you can install our develop branch directly.

Installing develop is mainly useful if there are key features or bug fixes that you urgently need so you can get those immediately and do not have to wait for the next release.

As the name suggests, the new features in the develop branch are still under development and might not be as polished as the final released version.

Use at your own risk; no guarantees given!

pip install git+ --upgrade

Using develop with Remote Orchestrators

Remote orchestrators like KubeFlow require Docker Images to set up the environmens of each step. By default, they use the official ZenML docker image that we provide with each release. However, if you install from develop, this image will be outdated, so you need to build a custom image instead, and specify it in the configuration of your orchestrator accordingly (see the MLOps Stacks Orchestrator page of your specific orchestrator flavor for more details on how this can be done).

Building Custom Docker Images

To build a custom image, you first need to install Docker, then run one of the following commands from the ZenML repo root depending on your operating system:

Linux, MacOS (Intel), Windows

docker build -t <IMAGE_NAME> -f docker/local-dev.Dockerfile .

MacOS (M1)

docker build --platform linux/amd64 -t <IMAGE_NAME> -f docker/local-dev.Dockerfile .

Last updated