Install TauDEM

Installing TauDEM actually means installing 3 tools:

Please follow instructions on how to install TauDEM, GDAL and MPI depending on your operating system, then finalize your installation as specified below.

No matter your operating system, take note of the steps you follow. This way, if anything goes wrong, you will be able to open an informative bug report and get help more easily.


You’re in luck! The TauDEM Windows installer will install all three tools at once! Refer to


To install the dependencies, Homebrew is recommended. It is a package manager, similar to APT on Linux systems.

  1. Open a terminal.

  2. Download and install GDAL and MPICH: sh brew install gdal mpich cmake

  3. Go to the Github page of TauDEM and download the code as ZIP

  4. Extract it and move the folder TauDEM-Develop to a convenient place, e.g.: sh /Users/$USER/Documents/TauDEM

  5. Go back to the terminal and go into the directory with: sh cd /Users/$USER/Documents/TauDEM/TauDEM-Develop

  6. Create a folder where the executables will be installed in: sh mkdir bin

  7. Go into source folder, create a build folder and go into with: sh cd src && mkdir build && cd build

  8. Build with cmake ...

  9. Finalize with:

    make && sudo make install

    The executable files will end up in /usr/local/taudem/.

  10. Add the location of the executable files to your path environment variable. This is a bit tricky on macOS, since RStudio and the package only see the path added to /etc/paths.d/. So add it
    with the following two commands:

    echo "/usr/local/taudem/" > taudem
    sudo mv taudem /etc/paths.d/



Do you need to install GDAL? In a terminal try gdalinfo --version, if it fails gdal-config --version. If it works and return something you do not need to install GDAL unless you want a newer version. You might have installed GDAL in the past for, say, using the sf R package.

If you need to, install GDAL using the official GDAL docs (or refer to TauDEM README for further suggestions).


First try running mpiexec --version in a terminal. If it works and returns something, you do not need to install MPI unless you want a newer version.

If you need to, install MPI using the official MPI docs (or refer to TauDEM README for further suggestions).


First you need to obtain TauDEM source for GitHub If you are at ease with this, you can clone the repository. If not, find the green button that allows you to clone, open (with GitHub CLI) or download, and download the ZIP version.

We recommend using CMake because that is what we did but TauDEM README also has a method using Make. Therefore,

If the installation shows errors, try using instead.

Even for a successful installation you might see many warnings.

Finalize your installation

Once you are done, you need to register TauDEM in R and check your installation.

Register TauDEM in R

Add TauDEM to the PATH

  • The Windows installer might have done this automatically.
  • For other operating systems (macOS, Linux) use your usual method to add a directory to the PATH.

OR add an environmental variable

Add an R environmental variable called TAUDEM_PATH that points to the location where the TauDEM executables can be found (on Windows it might be C:\Program Files\TauDEM, on Ubuntu /usr/local/taudem).

For instance on Ubuntu it could be adding this line in .Renviron (see usethis::edit_r_environ()) and then re-starting R:


or, for just the session, running this line of R code:

Sys.setenv(TAUDEM_PATH = "/usr/local/taudem")

Check your installation

Run traudem::taudem_sitrep() and read its output carefully. Pay attention to any error that might indicate part of the installation was not successful.

If all is well (no error, only normal output from TauDEM), congratulations! Your system is ready to apply TauDEM to your own data.