# Landlab developer install on Windows (with Visual Studio)

**URL:** <https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153>\
**Category:** Landlab\
**Tags:** documentation, landlab\
**Created:** [September 19, 2025, 9:45pm UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153 "2025-09-19T21:45:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdpiper](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/mdpiper/32/1_2.png) [@mdpiper](https://forum.csdms.io/u/mdpiper)\
**Post date:** [September 19, 2025, 9:45pm UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153/1 "2025-09-19T21:45:23Z")

</div>

Building Landlab from source on Windows is trickier than on Linux or macOS. Below are some steps, based on recent experience, that should work.

## Install Visual Studio

Landlab has many parts that are written in C, and we need a C compiler to build them. Download [Visual Studio Community Edition](https://visualstudio.microsoft.com/downloads/) and install it. We don’t need to use Visual Studio directly, but the compiler and linker included with it are used in the Landlab build process.

During installation, be sure to select this option:

- “Desktop development with C++” workload

This is what will install the compiler and linker with Visual Studio.

## Install Miniforge

To set up a Python environment to run Landlab, we use [Miniforge](https://github.com/conda-forge/miniforge). Download the [Windows installer](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe) for Miniforge and run it.

During installation, be sure to select these three options:

- “Create shortcuts”
- “Add Miniforge3 to my PATH environment variable” (even though a warning is given against this)
- “Register Miniforge as my default Python”

We’ll use the Miniforge Prompt, which is installed in the Windows Start menu, for the next steps.

## Create a conda environment

Through the Miniforge prompt, use conda to create a virtual environment for the Landlab developer install.

```auto
conda create -y -n landlab_dev python pip compilers git

```

Note that we’re including the conda compilers (which map to Visual Studio) in this environment, as well as git, pip, and python, all of which we’ll use below.

Activate the new environment.

```auto
conda activate landlab_dev

```

A host of status messages will stream past. The messages should end with text like this:

```auto
[vcvarsall.bat] Environment initialized for: 'x64'

```

## Clone the Landlab repository

From the Miniforge prompt, use git to clone the Landlab repository to your computer.

```auto
git clone git@github.com:landlab/landlab.git

```

You may wish to fork Landlab and clone your fork instead. You’ll need an SSH key pair set up on your computer for communicating with GitHub. See this [lesson](https://github.com/csdms/ivy/blob/main/lessons/git/github-authentication.md) from CSDMS Ivy for more information.

The cloned repository lives in a directory called `landlab`. Change to this directory.

```auto
cd landlab

```

## Install Landlab into the conda environment

From the Miniforge prompt, in the `landlab` directory with the activated `landlab_dev` environment, build Landlab from source and install it with pip.

```auto
pip install -e ".[dev,testing]"

```

Check that Landlab is installed by starting a Python session from the Miniforge prompt.

```auto
python

```

In the Python session, import the landlab package and check its version.

```auto
>>> import landlab
>>> landlab. __version__'2.10.2.dev0'

```

That’s it!

---

<div class="post-metadata">

**Author:** ![samharrison7](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/samharrison7/32/9_2.png) [@samharrison7](https://forum.csdms.io/u/samharrison7)\
**Post date:** [September 20, 2025, 7:12pm UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153/2 "2025-09-20T19:12:48Z")

</div>

Nice! I’m curious if you’ve tried out using GCC compilers via Conda Forge on Windows? E.g. [Anaconda.org](https://anaconda.org/conda-forge/gcc/). It might avoid needing to install VS. Having said that, I’ve always hit issues trying to do this for GFortran on Windows.

---

<div class="post-metadata">

**Author:** ![mdpiper](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/mdpiper/32/1_2.png) [@mdpiper](https://forum.csdms.io/u/mdpiper)\
**Post date:** [September 22, 2025, 4:24pm UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153/3 "2025-09-22T16:24:41Z")

</div>

Oh, that’s a great idea! I just tried it this morning and it works beautifully. I especially like how this keeps all dependencies, including the compiler and linker, within conda-forge.

I think using gcc should be the preferred method. I’ll write it up.

---

<div class="post-metadata">

**Author:** ![samharrison7](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/samharrison7/32/9_2.png) [@samharrison7](https://forum.csdms.io/u/samharrison7)\
**Post date:** [September 22, 2025, 9:42pm UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153/4 "2025-09-22T21:42:41Z")

</div>

I’m glad it worked well for you! I feel like slowly but surely, development on Windows is getting easier. (Windows Subsystem for Linux helps, but we’re not allowed to use it for cybersecurity reasons!)

---

<div class="post-metadata">

**Author:** ![gantian127](https://yyz2.discourse-cdn.com/flex012/user_avatar/forum.csdms.io/gantian127/32/67_2.png) [@gantian127](https://forum.csdms.io/u/gantian127)\
**Post date:** [February 14, 2026, 12:45am UTC](https://forum.csdms.io/t/landlab-developer-install-on-windows-with-visual-studio/153/5 "2026-02-14T00:45:14Z")

</div>

Suggestions for “Install Visual Studio” section:

If users do not need the full functionality of Visual Studio and only need the compiler tools, the **Visual Studio C++ Build Tools** ([https://visualstudio.microsoft.com/visual-cpp-build-tools/](https://visualstudio.microsoft.com/visual-cpp-build-tools/) ) are recommended, as they provide the necessary C/C++ compilation tools with a significantly smaller installation footprint.

The following command can be used to verify that the compiler tools (MSVC and the Windows SDK) are installed. Please make sure to open the **“Native Tools Command Prompt for VS”** before running it:

```auto
where cl # check MSVC

where rc # check Windows SDK resource compiler

```

These commands will display the corresponding installation paths. An example is shown below:

 ![image](https://canada1.discourse-cdn.com/flex012/uploads/csdms/original/1X/89da89f391f4a967492f49836665bd50df791329.png)
