This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Installation

This tutorial was developed and tested on Windows 11. Most steps also work on Linux, with some differences that will be addressed in a separate guide.

For efficient training and reproducibility, use a system with the following configuration:

Hardware

  • NVIDIA GPU with CUDA support

Software

  • Windows 11
  • Git
  • Miniconda or Anaconda
  • Microsoft Build Tools for Visual Studio 2022
  • Python 3.10
  • CUDA Toolkit 12.6 or a compatible version (install separately)
  • COLMAP (with CUDA support)
  • gsplat
  • SuperSplat

Note: Minor differences in software versions or CUDA drivers may require small adjustments.

Note: The CUDA Toolkit must be installed separately from the GPU driver to enable GPU acceleration. Without it, tools like PyTorch will not detect CUDA support. For instructions and compatibility details, see the CUDA Toolkit documentation.

Tested setup

This tutorial was verified using the following configuration:


© 2025 SmartDataScan.
This section is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

1 - Installing COLMAP

Download the Windows release

Go to the official COLMAP GitHub releases page and download the ZIP archive for Windows:
https://github.com/colmap/colmap/releases

Unpack the archive

Extract the contents of the ZIP file to a convenient location, such as: C:\Tools\colmap

This tutorial uses <COLMAP_PATH> as a placeholder for the COLMAP installation path. Replace it with the actual path you used.

Launch COLMAP

You can start the COLMAP GUI using either of the following methods:

Option A
Double-click COLMAP.bat in the extracted folder.

Option B
Open Command Prompt and run:

<COLMAP_PATH>\COLMAP.bat gui

Replace <COLMAP_PATH> with the actual installation path.

Verify the installation If installed correctly, the COLMAP GUI should open without errors. You should see the main window, as shown below:

Figure 3. COLMAP GUI main window on startup.

Alternative installation methods This tutorial uses the precompiled Windows release. For other options, including building from source or using package managers on Linux or macOS, refer to the official guide: https://colmap.github.io/install.html


© 2025 SmartDataScan.
This section is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

2 - Installing Microsoft Build Tools

The Microsoft Build Tools for Visual Studio provide the C++ compiler and related tools required to build C++ projects on Windows. This setup is necessary to compile gsplat from source.

Download the installer

Download the Build Tools for Visual Studio 2022 from the official website:
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022

Run the installer

During installation, select the following options:

Workload:

  • Desktop development with C++

Individual components (ensure these are checked):

  • MSVC v143 - VS 2022 C++ x64/x86 build tools
  • Windows 11 SDK
  • C++ CMake tools for Windows

Figure 4. Required components selected during Visual Studio Build Tools installation.

Verify the installation

You can verify that the build environment is configured correctly using either of the following methods.

Use the Developer Command Prompt

  1. Open the Start Menu and search for:
    Developer Command Prompt for VS 2022

  2. Run the following command:

cl

You should see output similar to:

Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34809 for x86
usage: cl [ option... ] filename... [ /link linkoption... ]

Use vcvars64.bat from a regular Command Prompt

  1. Open Command Prompt (cmd).
  2. Run the Visual Studio environment setup script:
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

Adjust the path if needed.

Then run:

cl

If the compiler is configured correctly, you will see the same output as in the previous option.


© 2025 SmartDataScan.
This section is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

3 - Installing gsplat and Preparing for Training

Verify that CUDA Toolkit is installed

Before installing PyTorch or building gsplat, verify that the CUDA Toolkit is installed and accessible. In Command Prompt, run:

nvcc --version

If installed correctly, you should see output similar to:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Fri_Jun_14_16:44:19_Pacific_Daylight_Time_2024
Cuda compilation tools, release 12.6, V12.6.20
Build cuda_12.6.r12.6/compiler.34431801_0

If the command is not recognized or no version is shown, install the CUDA Toolkit from the NVIDIA website. Older versions are available from the CUDA Toolkit archive.

Open a developer-enabled terminal

To build gsplat, use a terminal with the Visual C++ environment initialized.

Option A: Developer Command Prompt

  • Open the Start Menu
  • Launch: Developer Command Prompt for VS 2022

Option B: Use vcvars64.bat manually

  • Open Command Prompt
  • Run the setup script (adjust the path if needed):
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"

After running the script, the terminal will be configured with the necessary environment variables.

Create and activate a Conda environment

If not installed, download Miniconda or Anaconda.

Create and activate a new environment:

conda create -y -n gsplat python=3.10
conda activate gsplat

Install PyTorch with CUDA support

Visit the PyTorch installation page and choose the configuration matching your Python and CUDA version.

For CUDA 12.6, run:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126

Verify that PyTorch detects CUDA:

python -c "import torch; print(torch.cuda.is_available())"

Expected output:

True

Clone the gsplat repository

git clone --recursive https://github.com/nerfstudio-project/gsplat.git
cd gsplat

Here’s your reviewed and formatted markdown section following the Google Developer Documentation style guide, avoiding em-dashes and using consistent formatting:

Build gsplat

To build gsplat, run the following command:

set DISTUTILS_USE_SDK=1
pip install .

This sets the DISTUTILS_USE_SDK environment variable to avoid the following warning:

UserWarning: It seems that the VC environment is activated but DISTUTILS_USE_SDK is not set...

Install additional dependencies for examples

Navigate to the examples folder and install dependencies:

cd examples
pip install -r requirements.txt

Download example dataset

Clone the dataset repository:

git clone <URL_TO_EXAMPLE_DATA>

Replace <DATA_PATH> and <OUTPUT_PATH> with your actual paths.

Run training

Start training with the following command:

python simple_trainer.py default ^
  --eval_steps -1 ^
  --disable_viewer ^
  --data_factor 4 ^
  --data_dir <DATA_PATH> ^
  --result_dir <OUTPUT_PATH>

Replace <DATA_PATH> and <OUTPUT_PATH> with valid paths. If everything is set up correctly, the script should start and display a training progress bar.

Known issue on Windows: pycolmap binary parsing error

On Windows, you might encounter the following error when running the training script:

Error with pycolmap:
...
num\_cameras = struct.unpack('L', f.read(8))\[0]

This error is caused by mismatched struct unpacking logic in the Windows version. As of this writing, the fix has not yet been merged into the official pycolmap repository. For details, see the related pull request: https://github.com/rmbrualla/pycolmap/pull/2

To work around the issue, uninstall the original package and install a patched version from a community fork:

pip uninstall pycolmap -y
pip install git+https://github.com/mathijshenquet/pycolmap

© 2025 SmartDataScan.
This section is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.