본문 바로가기

Programming/Python

[Python] `pydot` failed to call GraphViz 해결 방안

keras를 가동중에 Graphviz를 이용해 그래프를 출력해야 하는데

아래와 같은 메세지를 뱉어내며 명령실행을 거부한다.

OSError: `pydot` failed to call GraphViz.Please install GraphViz (https://www.graphviz.org/) and ensure that its executables are in the $PATH.

알아보니 Graphviz 설치가 제대로 안되서 그런것이라고 한다.

아래의 방법으로 해결 가능하다.

1. 시스템 환경변수 PATH에 C:/~/graphviz/bin 이 설치된 경로를 적는다.
2. 난 아나콘다 사용자이므로 다음의 명령어를 입력했다.
    > conda install graphviz 를 실행 해서 설치완료
    실행이 안되서 알아보니 pydot과 연동되어 실행되니 같이 설치를 해보았다.
    그래서 아래의 명령어를 실행 했다.
    > conda install -c anaconda pydot 실행해서 설치완료

그후 아나콘다를 다시 실행해서 가동해보니 잘된다

 

References

[python] `pydot` failed to call GraphViz 해결 방안