> For the complete documentation index, see [llms.txt](https://wiki.solids.group/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.solids.group/alamo/running-with-python.md).

# Running Alamo with Python

Alamo supports a general Python interface. This is useful for testing functions and models; it is not intended to replace the input file system.

## Clean

If this is your first time building the Python interface, run:

```bash
make realclean
```

Some build options for the debug version are different.

## Configure

Run the configure script with:

```bash
./configure --debug
```

Currently only `g++` is supported because of an issue in AMReX.

## Build the Alamo Library and Python Files

Build with:

```bash
make py
```

This generates the `setup.py` scripts with paths appropriate for your system.

## Install

Use `pip` to install:

```bash
pip install -e /path/to/your/alamo
```

You need to have Python development files available. If `pip` complains that it cannot find `Python.H`, you probably do not have the development files installed.

## Run

You should now be able to run the following in a Python environment:

```python
import alamo
```

Make sure that you do not also have a folder or file named `alamo.py`. This is an easy naming conflict to create.

You can include specific header files with:

```python
alamo.include("Model/Propellant/PowerLaw.H")
```

Access elements from those files with:

```python
model = alamo.Model.Propellant.PowerLaw()
```

All routines and member variables should be accessible. Header files are interpreted, which means changes to headers appear immediately in your Python script without recompiling. If you change code in `.cpp` files, run `make lib` or `make py` again to see those changes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.solids.group/alamo/running-with-python.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
