Install the Datadog Agent Integration Developer Tool

This document covers how to setup a Python environment to work on Agent-based Integrations, including installing the interpreter and ensuring all of the required dependencies are present. Alternatively, you can use the standalone binaries and installers provided with each release.

GitHub releases

Each release provides the following:

  • Standalone binaries for Linux, Windows, and macOS
  • Windows AMD64 (64-bit) MSI installer
  • Windows x86 (32-bit) MSI installer
  • Windows universal (AMD64+x86) EXE installer
  • macOS DMG installer

Install Python

Many operating systems come with a pre-installed version of Python. However, the version of Python installed by default may be older than the version used in the Agent, and may lack some required tools and dependencies. To ensure that you’ve everything you need to get an integration running, install a dedicated Python interpreter.

Install Python 3.9 using Homebrew:

  1. Update Homebrew:

    brew update
    
  2. Install Python:

    brew install python@3.9
    
  3. Check the Homebrew installation output and run any additional commands recommended by the installation script.

  4. Verify that the Python binary is installed in your PATH and that you’ve installed the correct version:

    which python3.9
    

    You should see the following output depending on your Mac architecture:

    • ARM (M1+) machines:
      /opt/homebrew/bin/python3.9
      
    • MacOS on Intel machines:
      /usr/local/bin/python3.9
      
  1. Download the Python 3.9 64-bit executable installer and run it.
  2. Select the option to add Python to your PATH.
  3. Click Install Now.
  4. After the installation has completed, restart your machine.
  5. Verify that the Python binary is installed in your PATH:
    > where python
    
    C:\Users\<USER>\AppData\Local\Programs\Python\Python39\python.exe
    

For Linux installations, avoid modifying your system Python. Datadog recommends installing Python 3.9 using pyenv or miniconda.

Install pipx

The pipx python package is required for the ddev command line tools.

  1. Install pipx:

    brew install pipx
    
  2. Check the Homebrew installation output and run any additional commands recommended by the installation script.

  3. Verify that pipx is installed:

    which pipx
    

    You should see the following output depending on your Mac architecture:

    • ARM (M1+) machines:
      /opt/homebrew/bin/pipx
      
    • MacOS on Intel machines:
      /usr/local/bin/pipx
      
  1. Install pipx:

    python -m pip install pipx
    
  2. Verify that pipx is installed:

    > where pipx
    C:\Users\<USER>\AppData\Local\Programs\Python\Python39\Scripts\pipx.exe
    
  1. Install pipx:
    python -m pip install pipx
    
  2. Verify that pipx is installed:
    pipx --version
    

Install the Datadog Agent Integration Developer Tool

  1. Run the following command and remove any executables shown in the output:

    which -a ddev
    
  2. Make sure there are no virtual environments running:

    1. Run the following command:

      echo $VIRTUAL_ENV
      
    2. If the command returns output, a virtual environment is running. Run deactivate to exit the virtual environment.

  3. Install ddev:

    Do not run this command with sudo.
    • ARM (M1+) machines:

      pipx install --python /opt/homebrew/bin/python3.9 ddev
      
    • MacOS on Intel machines:

      pipx install --python /usr/local/bin/python3.9 ddev
      
  4. Check the installation output and run any additional commands recommended by the installation script.

  1. To install ddev, run:
    pipx install ddev
    
  1. To install ddev, run:

    Do not run this command with `sudo`.
    pipx install ddev