Installing

Pyrlang needs Python 3.11 or newer. Its one dependency is Term (pyrlang-term on PyPI).

From PyPI

pip install pyrlang

pyrlang-term comes with it. Its wheels for Linux, Windows and macOS contain the native codec. Where no wheel fits, pip builds Term from source: with a Rust toolchain you get the native codec, without one the Python codec, which gives the same results more slowly.

The release on PyPI can be older than the source. This documentation describes the source.

From source

Clone both repositories next to each other and install Term first:

git clone https://github.com/Pyrlang/Term.git
git clone https://github.com/Pyrlang/Pyrlang.git
pip install -e Term --config-settings editable_mode=compat
pip install --no-deps -e Pyrlang

--no-deps keeps pip from replacing the Term you just installed with the one from PyPI.

What else you need

  • An EPMD on the host. A node registers its name and port in the Erlang Port Mapper Daemon. Erlang/OTP starts one with the first erl -name ...; on a host without Erlang use Epmd (python -m epmd), or run without EPMD.

  • The same cookie on every node that should connect.

  • Full node names (name@host): start Erlang with -name, not -sname, and use a host part that every node can resolve.

Building this documentation

pip install -e . --group docs
python -m sphinx -W --keep-going -b html docs-src/source docs-src/build/html

The pages link into the Term and Epmd sites. With the three repositories next to each other, build Term’s and Epmd’s documentation first: Pyrlang’s build then reads their object inventories from docs-src/build/html, and otherwise from the published sites.