Installation#

PyCFAST requires Python 3.10 or later. It is tested against CFAST 7.7.0 through 7.7.6. Versions below 7.7.0 might work but are not guaranteed to be fully compatible.

It is recommended to install PyCFAST inside a virtual environment. Create one with venv or conda before installing:

python -m venv .venv
source .venv/bin/activate
python -m venv .venv
.venv\Scripts\activate
conda create -n pycfast python=3.14
conda activate pycfast

Pip#

PyCFAST can be installed from PyPI:

pip install pycfast

Conda#

PyCFAST can also be installed from the conda-forge channel:

conda install -c conda-forge pycfast

Source#

To install the latest development version of PyCFAST, clone the repository and install the required dependencies:

git clone https://github.com/bewygs/pycfast.git
cd pycfast
python -m pip install .

CFAST Installation#

Download and install CFAST from the NIST CFAST downloads page or the CFAST GitHub repository. Follow the installation instructions for your operating system and ensure cfast is available in your PATH. On Windows go into command prompt and run cfast to verify that it is on your PATH. You should see the CFAST version information.

CFAST command prompt on Windows

If CFAST is installed in a non-standard location, you can specify its path in three ways:

1. Environment variable (shell)

export CFAST="/path/to/your/cfast/executable"
set CFAST="C:\path\to\your\cfast\executable"
$env:CFAST = "C:\path\to\your\cfast\executable"

2. Environment variable (Python)

import os

os.environ['CFAST'] = "/path/to/your/cfast/executable"

3. Directly when defining the CFASTModel

from pycfast import CFASTModel

model = CFASTModel(
    ...,
    cfast_exe="/path/to/your/cfast/executable"
)