Installing Python and pip

To check that Python and the pip package manager are already installed in your environment, you can run:

$ python --version
$ pip --version

If you're running Python 3.3 or later, you already have the venv package for managing virtualenvs. On Python 2.7, you can check whether you have the virtualenv tool installed by running:

$ virtualenv --version

If these tools aren't present on your system, you can install them as follows:

Installing Python on Ubuntu

$ sudo apt update
$ sudo apt install python3-dev python3-pip

This will install Python 3 and pip on your system.

Installing Python on macOS

Using Homebrew:

$ brew update
$ brew install python  # Python 3

This will install Python 3 on your system.

If you are using the macOS-provided Python 2.7, you can install virtualenv with:

$ sudo pip install -U virtualenv  # system-wide install

Installing Python on Windows

  • Install the Microsoft Visual C++ 2015 Redistributable Update 3. This comes with Visual Studio 2015 but can be installed separately as follows:
    1. Go to the Visual Studio downloads,
    2. Select Redistributables and Build Tools,
    3. Download and install the Microsoft Visual C++ 2015 Redistributable Update 3.
  • Install the 64-bit Python 3 release for Windows (select pip as an optional feature).

To use the dagit tool, you will also need to install yarn.

Notes on Python virtualenvs

We strongly recommend installing dagster inside a Python virtualenv.

If you are running Anaconda, you should install dagster inside a Conda environment.

To create a virtual environment on Python 3, you can just run:

$ python3 -m venv ~/.venvs/dagster

This will create a new Python environment whose interpreter and libraries are isolated from those installed in other virtual environments, and (by default) any libraries installed in a "system" Python installed as part of your operating system.

On Python 2, you can use a tool like virtualenvwrapper to manage your virtual environments, or just run:

$ virtualenv ~/.venvs/dagster

You'll then need to 'activate' the virtualenvironment, in bash by running:

$ source ~/.venvs/dagster/bin/activate

(For other shells, see the venv documentation.)

If you are using Anaconda, you can run:

$ conda create --name dagster

And then, on macOS or Ubuntu:

$ source activate dagster

Or, on Windows:

$ activate dagster