Installation¶
Requirements¶
GenSec requires Python 3.10 or later (at the moment, 3.14 is not supported because of triangle package compatibility).
Core dependencies (installed automatically):
numpy >= 1.24scipy >= 1.10matplotlib >= 3.6pyyaml >= 6.0shapely >= 2.0triangle— constrained Delaunay triangulation for non-rectangular meshes.
Optional performance dependencies:
numba >= 0.58— JIT compilation of material stress/tangent kernels. Provides a ~2–3× speed-up on large fiber arrays. Install withpip install gensec[fast]oruv sync --all-extras.
Optional dependencies for building the documentation:
sphinxfuro(HTML theme)sphinx-multiversionsphinxcontrib-mermaid
Install with uv (recommended)¶
uv is the recommended tool for managing the virtual environment and dependencies:
git clone https://github.com/Jagtree/gensec.git
cd gensec
uv sync
To enable optional Numba acceleration:
uv sync --all-groups --all-extras
This creates a .venv in the project root, installs all dependencies
(including dev dependencies for testing), and makes the gensec CLI
available inside the virtual environment.
Install with pip¶
pip install -e .
With Numba acceleration:
pip install -e ".[fast]"
For development (editable install with test dependencies):
pip install -e ".[dev]"
Verify the installation¶
# Check version
uv run gensec --version
# Run the test suite
uv run python -m pytest tests/ -v
All 106 tests should pass.
Building the documentation¶
# Single-version build
uv run sphinx-build docs docs/_build/html
# Multi-version build (see :doc:`/ci_and_versioning`)
uv run sphinx-multiversion docs docs/_build/multiversion
The HTML output is written to docs/_build/html/index.html.