# Install

Source: https://docs.tradefloor.dev/install.html

> Install tradefloor with pip, check the version and default preset, and add the optional extras for MCP, Gymnasium, Arrow tables and LLM agent frameworks.

```
pip install tradefloor
```

The package has no required dependencies. Everything that needs another library, such as the MCP server or the Gymnasium environment, is an optional extra.

## Requirements

tradefloor needs CPython 3.11 or later. Releases are tested on 3.11, 3.12 and 3.13 and ship prebuilt wheels for five targets:

| Operating system | Architectures |
| --- | --- |
| Linux | x86_64, aarch64 |
| macOS | arm64 (Apple silicon), x86_64 (Intel) |
| Windows | x86_64 |

On any other platform pip builds the package from source, and for that you need a [Rust toolchain](https://rustup.rs). To use the engine from Rust, run `cargo add tradefloor`, and see [Embedding the engine](https://docs.tradefloor.dev/embedding.html) for running it inside your own app or game.

Before a release is published, it runs a fixed set of simulations on all five targets and stops if any result differs, so a seed gives you the same market on any of them. [Reproducibility](https://docs.tradefloor.dev/reproducibility.html) says what that check covers and what it leaves out.

## Checking the install

```
import tradefloor as tf

print(tf.__version__)
print(tf.preset_record()["preset"])
```

```
0.11.0
pt-v22
```

The first line is the package version. The second is the default [preset](https://docs.tradefloor.dev/glossary.html#preset), the set of model coefficients a market runs on when you do not name one.

## Optional extras

Name an extra in square brackets. Quote the argument, because some shells read the brackets themselves:

```
pip install "tradefloor[mcp]"
```

| Extra | Installs | Needed for |
| --- | --- | --- |
| arrow | pyarrow | reading a run's output tables with pyarrow |
| rl | NumPy and Gymnasium | tradefloor.gym, the gym environment |
| mcp | the MCP SDK and pyarrow | the tradefloor-mcp server (Local MCP server) |
| openai-agents | the OpenAI Agents SDK | the OpenAI Agents adapter, in live mode |
| pydantic-ai | pydantic-ai-slim | the PydanticAI adapter, in live mode |
| langgraph | LangGraph | the LangGraph adapter, in live mode |
| finrobot | FinRobot and its dependencies | the FinRobot adapter, in live mode. Python 3.11 only |
| claude | the Anthropic SDK and Pydantic | the example examples/08-claude-agent.py |

The output tables are Arrow tables. You can read them with polars, pandas or duckdb, and you only need the `arrow` extra if you want pyarrow itself.

An adapter needs its framework only when it calls a model. A plain `pip install tradefloor` can replay a recorded run. In live mode, an adapter whose framework isn't installed raises `MissingDependencyError`. That's an `ImportError`, and its message gives the `pip install` command for the extra.

## Pinning a version

Before 1.0 the API can change in any minor release. Pin the version you tested with:

```
pip install "tradefloor==0.11.0"
```

Pinning the version pins the default preset too. [Support policy](https://docs.tradefloor.dev/support.html) says what a patch release may change and how long a release line gets fixes.

## Examples and notebooks

The numbered examples and notebooks aren't installed with the package. Clone the [GitHub repository](https://github.com/simoncoombes/tradefloor) to run them. Some of them read recorded runs from its `tests/fixtures/` folder.

If an install or an import fails, see [Troubleshooting](https://docs.tradefloor.dev/troubleshooting.html#installation-and-extras).
