docs/source/installation.md
You can install TRL either from PyPI or from source:
Install the library with pip or uv:
<hfoptions id="install"> <hfoption id="uv">uv is a fast Rust-based Python package and project manager. Refer to Installation for installation instructions.
uv pip install trl
pip install trl
You can also install the latest version from source. First clone the repo and then run the installation with pip:
git clone https://github.com/huggingface/trl.git
cd trl/
pip install -e .
If you want the development install you can replace the pip install with the following:
pip install -e ".[dev]"