그래프를 렌더링하려면 anytree 패키지의 documentation을 따라야합니다. 나는이graphiz 및 anytree 패키지를 사용하여 Python으로 그래프를 렌더링하는 방법
RenderTreeGraph(udo).to_picture("udo.png")
임지고 다음과 같은 오류를 실행하려고하면
pip3 install graphviz
를 사용하여 내 Mac에서은 GraphVIZ 설치가 있습니다
Traceback (most recent call last): File "", line 1, in RenderTreeGraph(udo).to_picture("udo.png") File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/anytree/dotexport.py", line 51, in to_picture check_call(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 286, in check_call retcode = call(*popenargs, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in init restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'dot'
나를 나무 렌더링 도와주세요