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.
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.8 using Homebrew:
Update Homebrew:
Install Python:
Check the Homebrew installation output and run any additional commands recommended by the installation script.
Verify that the Python binary is installed in your PATH
and that you’ve installed the correct version:
You should see the following output depending on your Mac architecture:
- ARM (M1+) machines:
/opt/homebrew/bin/python3.8
- MacOS on Intel machines:
- Download the Python 3.8 64-bit executable installer and run it.
- Select the option to add Python to your PATH.
- Click Install Now.
- After the installation has completed, restart your machine.
- Verify that the Python binary is installed in your
PATH
:> where python
C:\Users\<USER>\AppData\Local\Programs\Python\Python38\python.exe
For Linux installations, avoid modifying your system Python. Datadog recommends installing Python 3.8 using pyenv or miniconda.
Install pipx
The pipx
python package is required for the ddev
command line tools.
Install pipx:
Check the Homebrew installation output and run any additional commands recommended by the installation script.
Verify that pipx is installed:
You should see the following output depending on your Mac architecture:
- ARM (M1+) machines:
- MacOS on Intel machines:
Install pipx:
python -m pip install pipx
Verify that pipx is installed:
> where pipx
C:\Users\<USER>\AppData\Local\Programs\Python\Python38\Scripts\pipx.exe
- Install pipx:
python -m pip install pipx
- Verify that pipx is installed:
Run the following command and remove any executables shown in the output:
Make sure there are no virtual environments running:
Run the following command:
If the command returns output, a virtual environment is running. Run deactivate
to exit the virtual environment.
Install ddev
:
Do not run this command with sudo
.
ARM (M1+) machines:
pipx install ddev --python /opt/homebrew/bin/python3.8
MacOS on Intel machines:
pipx install ddev --python /usr/local/bin/python3.8
Check the installation output and run any additional commands recommended by the installation script.
To install ddev
, run:
Do not run this command with `sudo`.