Skip to content

Installation

Python Package

Prerequisites

Install GSL (GNU Scientific Library):

brew install gsl
sudo apt-get install libgsl-dev
sudo dnf install gsl-devel

Install from Source

# Clone the repository
git clone https://github.com/yourusername/gp4c.git
cd gp4c

# Install in development mode
pip install -e .

# Or with optional dependencies
pip install -e ".[dev,viz]"

C Library

The core GP sampler can be used directly in C/C++ projects without Python.

Quick Install

./install_library.sh

Requires sudo access.

./install_library.sh --user

No sudo required.

CMake Build

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel
sudo cmake --install .

Using the Library

Link against gp4c in your C projects:

gcc -o solver solver.c $(pkg-config --cflags --libs gp4c)

See C Integration for detailed examples.

Verify Installation

import gp4c
print(gp4c.__version__)