For macOS:
-
Install graphviz
brew install graphviz
-
Then install pygraphviz for Python3
pip3 install pygraphviz
-
Download toSVG.py here
-
In your Python file, import toSVG.py
from toSVG import *
-
Call the function
toSVG(tree, "name")
There is no simple installation for windows