Installing Python Bindings¶
The python package may be installed with pip
:
pip install gtn
To build and install from source, first clone the repo:
git clone https://github.com/facebookresearch/gtn.git
Setup your environment:
conda create -n gtn_env
conda activate gtn_env
Install dependencies:
cd bindings/python
conda install setuptools
Use one of the following commands for installation:
python setup.py install
or, to install in editable mode (for dev):
python setup.py develop
Running Python Tests¶
Python binding tests can be run with make test
, or with
python -m unittest discover bindings/python/test
Run a simple example:
python bindings/python/examples/simple_graph.py