Installation prerequisites — Kedro 0.17.6 documentation

# Installation prerequisites

- Kedro supports macOS, Linux and Windows (7 / 8 / 10 and Windows Server 2016+). If you encounter any problems on these platforms, please check the frequently asked questions, GitHub Discussions or the Discord Server.

- To work with Kedro, we highly recommend that you download and install Anaconda (Python 3.x version).

- If you are using PySpark, you will also need to install Java. If you are a Windows user, you will need admin rights to complete the installation.

## Virtual environments

The main purpose of Python virtual environments is to create an isolated environment for a Python project to have its own dependencies, regardless of other projects. We recommend that you create a new virtual environment for each new Kedro project you create.

> Read more about Python Virtual Environments.

Depending on your preferred Python installation, you can create virtual environments for working with Kedro as follows:

- With `conda`, a package and environment manager program bundled with Anaconda

- Without Anaconda using `venv` or `pipenv`

### `conda`

Install `conda` on your computer.

Create a new Python virtual environment, called `kedro-environment`, using `conda`:

    conda create --name kedro-environment python=3.7 -y

This will create an isolated Python 3.7 environment. To activate it:

    conda activate kedro-environment

To exit `kedro-environment`:

    conda deactivate

Note

The `conda` virtual environment is not dependent on your current working directory and can be activated from any directory.

### `venv` (instead of `conda`)

If you are using Python 3, you should already have the `venv` module installed with the standard library. Create a directory for working with Kedro within your virtual environment:

    mkdir kedro-environment && cd kedro-environment

This will create a `kedro-environment` directory in your current working directory. Then you should create a new virtual environment in this directory by running:

    python -m venv env/kedro-environment  # macOS / Linux
    python -m venv env\kedro-environment  # Windows

Activate this virtual environment:

    source env/kedro-environment/bin/activate # macOS / Linux
    .\env\kedro-environment\Scripts\activate  # Windows

To exit the environment:

    deactivate

### `pipenv` (instead of `conda`)

You will need to install `pipenv` as follows:

    pip install pipenv

Create a directory for the virtual environment and change to that directory:

    mkdir kedro-environment && cd kedro-environment

Once all the dependencies are installed, to start a session with the correct virtual environment activated:

    pipenv shell

To exit the shell session:

    exit