컴공 공부/데이터 분석

파이썬 graphviz 에러 해결

무무뭉? 2021. 10. 7. 16:41

failed to execute 'dot', make sure the Graphviz executables are on your systems' PATH

ExecutableNotFound: failed to execute ['dot', '-Tpng', '-O', 'tmp'], make sure the Graphviz executables are on your systems' PATH

등등 graphviz를 사용하려고 할 때마다 에러가 발생함을 알 수 있다.

인터넷에 있는 글을 보면

pip install graphviz
conda install graphviz

라는 방법을 설명하고 있지만! 저는 이 두가지 방법이 모두 소용이 없었습니다.

 

그래서 제가 해결한 방법을 설명해드리자면 https://graphviz.org/download/ 

 

Download

Graph Visualization Software

graphviz.org

링크에 들어가면 아래 같은 사이트로 들어가지는데 스크롤을 조금 내려서

이런 다운로드 할 수 있는 파일이 보인다. 여기서 graphviz-2.49.1(64bit) EXE installer[sha256]을 클릭해서 다운받고 설치된 파일을 실행해주시면 된다.

다음을 몇번 누르다보면 설치가 완료될텐데 시스템 환경변수 설정에 들어가서

user에는 C:\Program Files\Graphviz\bin

system에는 C:\Program Files\Graphviz\bin 와 C:\Program Files\Graphviz\bin\dot.exe 를 추가해주시면 됩니다.

 

그다음 주피터 노트북을 재 실행시키면 아래 사진처럼 에러 없이 깔끔한 화면을 볼 수 있습니다.