Is there a way to install it like any other python package, e.g. pip install graphviz.
Yes, graphviz is available on PyPi and can be installed by running:
pip install graphviz
It currently supports Python 3.8 - 3.12 and is OS Independent. See https://pypi.org/project/graphviz/#data