Mac uses graphviz package to report error failed to execute posixpath (‘dot ‘)

When using lightgbm for visualization, the graphviz package is used. The following problems are encountered when installing the graphviz package.

Error Description:

ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH


Error cause analysis:

At first, it was thought that the reason was that the graphviz module was not installed, so PIP install graphviz was used   Later, it was found that it still couldn’t be reinstalled after uninstalling with PIP uninstall graphviz
finally, it was found that the graphviz program needs to be installed first
to explain, after installing graphviz with PIP install graphviz, only the python calling interface of graphviz is installed. If you use graphviz, you also need to download the installation file of graphviz.



You can install the graphviz package on the MAC using the following command

sudo port install graphviz



Similar Posts: