Skip to content

Installation

Use a fresh Python environment, install openseespy-solvers, then add only the optional backends you need.

Requirements

Component Requirement
Python 3.12 or newer
NumPy 1.26 or newer
scipy 1.12 or newer
OpenSeesPy Needed to run OpenSees analyses and examples; use a serial build

openseespy-solvers does not install OpenSeesPy by default. This keeps the base package small and lets users add OpenSeesPy only when they need the OpenSees integration.

Quick Install

python -m pip install openseespy-solvers

If OpenSeesPy is not already installed in the environment:

python -m pip install "openseespy-solvers[opensees]"

Fresh Environment

Conda:

conda create -n openseespy-solvers python=3.12
conda activate openseespy-solvers
python -m pip install "openseespy-solvers[opensees]"

venv:

python3.12 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
python -m pip install "openseespy-solvers[opensees]"

Optional Backends

UMFPACK

UMFPACK enables the openseespy_solvers.scipy.umfpack CPU direct solver.

Linux or macOS:

python -m pip install "openseespy-solvers[umfpack]"

Windows:

conda install -c conda-forge scikit-umfpack

If pip builds from source on Linux, you may also need SuiteSparse from your system package manager, for example libsuitesparse-dev on Debian or Ubuntu.

NVIDIA GPU

GPU solvers require an NVIDIA driver and CUDA-compatible wheels. Start by checking the CUDA generation reported by the driver:

nvidia-smi

For CUDA 13.x:

python -m pip install "openseespy-solvers[cuda13]"

For CUDA 12.x:

python -m pip install "openseespy-solvers[cuda12]"

These extras install both cupy and nvmath for the selected CUDA generation. Keep cupy and nvmath on the same CUDA generation. Avoid installing the generic cupy package unless you intentionally want to build cupy from source.

Development Install

Clone the repository when you want examples, benchmarks, tests, or documentation sources:

git clone https://github.com/gaaraujo/openseespy-solvers.git
cd openseespy-solvers
python -m pip install -e ".[dev,opensees]"

Add optional backends from the sections above as needed.

Verify

From the repository root:

python -m pip check
python -m pytest

Run two small OpenSeesPy examples:

cd examples
python solvers/scipy_spsolve.py
python solvers/scipy_eigsh.py

GPU and UMFPACK tests run only when the corresponding optional packages are installed; otherwise they are skipped.

For timing comparisons against native OpenSees solvers:

python brick_bar.py
python brick_bar_eigen.py

Troubleshooting

OpenSeesPy Parallel Builds

These solvers target serial OpenSeesPy. GPU backends accelerate the sparse solve, but the OpenSees model assembly still happens in one process. Parallel or MPI OpenSeesPy builds are not supported by this package. See PythonSparse and parallelism.

UMFPACK Fails to Install on Windows

Use conda-forge:

conda install -c conda-forge scikit-umfpack

The PyPI package may need source-build tools that are inconvenient on Windows.

cupy Cannot Find CUDA Libraries

Install the cupy wheel with bundled runtime libraries:

python -m pip install "cupy-cuda13x[ctk]"   # or cupy-cuda12x[ctk]

Also confirm that nvidia-smi works and that cupy and nvmath use the same CUDA generation.

Build Documentation Locally

python -m pip install -e ".[docs]"
mkdocs serve

Open http://127.0.0.1:8000.