GTSAM 4.3.0 · stable release

Install GTSAM 4.3

Use the official Python wheels for the shortest path, or build the C++17 library from the tagged source release. Both routes below end with a working factor graph.

Release4.3.0September 19, 2026
LanguageC++17Required for source builds
Python3.11–3.14Official wheels
LicenseBSD-3Research and commercial use
01
Fastest path

Install the Python package

PyPI provides official GTSAM 4.3.0 wheels for CPython 3.11 through 3.14 on Linux x86-64, Linux ARM64, and macOS universal2.

Terminal · Linux / macOS
python3 -m venv .venv-gtsam
source .venv-gtsam/bin/activate
python -m pip install --upgrade pip
python -m pip install "gtsam==4.3.0"
python -c "from importlib.metadata import version; print(version('gtsam'))"
Expected version4.3.0

What this installs

  • The Python API and compiled GTSAM library
  • Core nonlinear, linear, discrete, hybrid, navigation, SLAM, SFM, constrained, and certifiable modules
  • No local C++ compilation on supported wheel platforms

Use Python 3.11–3.14. If a suitable virtual or conda environment is already active, skip the environment-creation and activation commands. On Debian/Ubuntu, install the matching python3-venv package if venv is unavailable.

For unreleased changes from develop, use python -m pip install gtsam-develop in a separate environment. Development wheels can change between builds.

Windows: the 4.3.0 PyPI release does not provide Windows wheels. Build from source below, or use the community-maintained conda-forge package.
CUDA with Python: the standard 4.3.0 wheels do not include gtsam.cuda. You must compile GTSAM and its Python wrapper on a CUDA-equipped machine. Follow the CUDA Python build recipe; installing the CUDA toolkit alone does not add bindings to an existing wheel.
02
C++ and custom builds

Build the tagged source release

Use the 4.3.0 tag for a reproducible build. Install Git, a C++17 toolchain, and CMake 3.16 or newer first. This recipe disables the optional Boost features and installs to a user-writable prefix.

Terminal · Linux / macOS
git clone --branch 4.3.0 --depth 1 https://github.com/borglab/gtsam.git
cd gtsam
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX="$HOME/.local" \
  -DGTSAM_USE_BOOST_FEATURES=OFF \
  -DGTSAM_ENABLE_BOOST_SERIALIZATION=OFF
cmake --build build --parallel 6
cmake --build build --target install
cmake --build build --target Pose2SLAMExample --parallel 6
./build/examples/Pose2SLAMExample

Continuously tested toolchains

Linux
GCC 11, 13–15; Clang 11, 14, 16
macOS
Xcode 16
Windows
MSVC toolset 14.40
Build system
CMake ≥ 3.16

Older C++17-capable toolchains may work but are not continuously tested.

Enable optional Boost features

The recipe above disables Boost. To enable Boost-dependent features and serialization, first install Boost 1.70 or newer (brew install boost on macOS or sudo apt-get install libboost-all-dev on Ubuntu), then reconfigure and rebuild. These flags default to ON in ordinary CMake builds:

cmake -S . -B build \
  -DGTSAM_USE_BOOST_FEATURES=ON \
  -DGTSAM_ENABLE_BOOST_SERIALIZATION=ON
Run the test suite

After configuration, build the check target. It is deliberately separate from installation.

cmake --build build --target check
Windows with Ninja

From a fresh checkout, run in a Visual Studio Developer PowerShell. Use a separate build directory from any existing non-Ninja configuration:

cmake -S . -B build-ninja -G Ninja -DCMAKE_BUILD_TYPE=Release `
  -DCMAKE_INSTALL_PREFIX="$env:USERPROFILE/gtsam-install" `
  -DGTSAM_USE_BOOST_FEATURES=OFF `
  -DGTSAM_ENABLE_BOOST_SERIALIZATION=OFF
cmake --build build-ninja --parallel 6
cmake --build build-ninja --target install
cmake --build build-ninja --target Pose2SLAMExample --parallel 6
.\build-ninja\bin\Pose2SLAMExample.exe
Use GTSAM from another CMake project
find_package(GTSAM 4.3 REQUIRED)
target_link_libraries(my_program PRIVATE gtsam)

The C++ example prints a five-pose factor graph, its optimized poses, and marginal covariances. See Pose2SLAMExample.cpp for the source. This C++ build does not install Python bindings; the next section is for the Python installation route.

03
Verify the API

Run a first factor graph in Python

This small Pose2 problem anchors one pose, adds an odometry measurement, and estimates the second pose from deliberately perturbed initial values.

first_graph.py
import gtsam
from gtsam.symbol_shorthand import X

graph = gtsam.NonlinearFactorGraph()
prior_noise = gtsam.noiseModel.Diagonal.Sigmas([0.3, 0.3, 0.1])
odom_noise = gtsam.noiseModel.Diagonal.Sigmas([0.2, 0.2, 0.1])

graph.add(gtsam.PriorFactorPose2(X(0), gtsam.Pose2(), prior_noise))
graph.add(gtsam.BetweenFactorPose2(
    X(0), X(1), gtsam.Pose2(2.0, 0.0, 0.0), odom_noise
))

initial = gtsam.Values()
initial.insert(X(0), gtsam.Pose2(0.2, -0.1, 0.05))
initial.insert(X(1), gtsam.Pose2(2.3, 0.2, -0.05))

result = gtsam.LevenbergMarquardtOptimizer(graph, initial).optimize()
print(result.atPose2(X(1)))
prior odometry x0x1
  1. VariablesTwo robot poses on SE(2)
  2. FactorsA prior and a relative-pose measurement
  3. ResultThe optimizer returns a Values estimate near (2, 0, 0)
04
Examples and API guides

Continue with a worked example

Choose the notebook closest to your problem. The 4.3 documentation includes 328 notebooks across worked examples and module API guides; not every notebook is a standalone executable example. Some need optional dependencies or a custom build.

05
Other distribution channels

Choose a package source deliberately

ChannelUse it whenMaintained by
PyPI · gtsamYou want the stable Python API on a supported wheel platform.GTSAM projectFiles →
Source tag · 4.3.0You need C++, MATLAB, CUDA, Windows, or custom build options.GTSAM projectRelease →
PyPI · gtsam-developYou need an unreleased fix and can tolerate API changes.GTSAM projectNightlies →
conda-forgeYou manage a cross-platform environment with conda or mamba.CommunityPackage →
06
Coming from 4.2

Three build and API changes to check

01

C++17 is required

Move downstream projects to a C++17-capable toolchain before adopting 4.3.

02

Boost is optional

Core builds can omit Boost, but the two Boost feature flags default to ON in ordinary CMake builds.

03

Audit deprecated APIs

Configure with GTSAM_ALLOW_DEPRECATED_SINCE_V43=OFF to find APIs scheduled for removal after 4.3.