This guide covers installation of GTSfM using Conda package manager.
- MiniConda installed on your system
To run GTSfM, first, we need to create a conda environment with the required dependencies.
conda env create -f environment_linux.yml
conda activate gtsfm-v1 # you may need "source activate gtsfm-v1" depending upon your bash and conda set-upCheck your cuda version then install torch_scatter from pre-built wheels
For example, for CUDA 12.1, use cu121
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.1+cu121.htmlFor CUDA 13, use cu128
pip install torch-scatter --find-links https://data.pyg.org/whl/torch-2.7.0+cu128.htmlconda env create -f environment_mac.yml
conda activate gtsfm-v1Now, install gtsfm as a module:
pip install -e .Make sure that you can run python -c "import gtsfm; import gtsam; print('hello world')" in python, and you are good to go!