PyTeal is a python library for creating TEAL instructions. To quickly get PyTeal installed and running, see the Getting started tutorial for PyTeal. Complete installation instructions are available in the PyTeal documentation:
https://pyteal.readthedocs.io/en/stable/installation.html