xflr6 / graphviz

Simple Python interface for Graphviz
https://graphviz.readthedocs.io
MIT License
1.63k stars 211 forks source link

"failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH" error on platform #68

Closed InstantWindy closed 5 years ago

InstantWindy commented 5 years ago

Hi!When I run “make_dot ()”,it appears“failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH ” error. I install graphviz offline by the command of pip insatll graphviz-0.10.1-py2.py3-none-any.whl. Thanks!

xflr6 commented 5 years ago

Hi, see https://graphviz.readthedocs.io/en/stable/manual.html#installation (you will also need to install Graphviz).

KranthiKumar28 commented 4 years ago

Add graphviz to the System Path:

Windows - Edit the System Environment Variables. Choose Environment Variables. Select Path - New Add the Path of graphviz Ex: C:\Users\AppData\Local\Continuum\anaconda3\Library\bin\graphviz

Shahrullo commented 4 years ago

you installed it by pip install graphviz. In that case, the graphviz executable sit on a different path from your directory. Do conda install python-graphviz.

marcosmcz commented 4 years ago

conda install python-graphviz

This is useful if you are working in jupyter and not on your actual machine.

zhtyyx commented 3 years ago

In Ubuntu, try: "sudo apt install graphviz" and solved this problem.

sagar-singh20 commented 3 years ago

An easier Solution:

Use pip install graphviz

Then just make sure Anaconda is added to the system Path and everything will work fine. Adding Anaconda to the system path will ensure graphviz will be found

To find Anaconda Path:

In Anaconda prompt type where conda and copy the path as shown up till Scripts

Then in CMD type conda --version. If everything is good it will show the version

TawabG commented 2 years ago

you installed it by pip install graphviz. In that case, the graphviz executable sit on a different path from your directory. Do conda install python-graphviz.

When I run this line in the terminal (MacOS Big Sur version 11.5.2, conda version 4.10.3) I get the following:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - python-graphviz.

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

I have also tried running the commands "conda install -c conda-forge python-graphviz" and "conda install -c conda-forge graphviz" as noted in the graphviz docs (https://graphviz.readthedocs.io/en/stable/manual.html#installation)

xflr6 commented 2 years ago

Please report issues related to (downstream) https://anaconda.org/conda-forge/python-graphviz at https://github.com/conda-forge/python-graphviz-feedstock/.

shashii82 commented 2 years ago

I was also getting the same error and tried several other way like "pip install graphviz" or "python3 -m pip install graphviz" but worked only conda install. Here what it looks like -

(base) PS C:\WINDOWS\system32> conda install graphviz Collecting package metadata (current_repodata.json): done Solving environment: done

Package Plan

environment location: C:\ProgramData\Anaconda3

added / updated specs:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
cairo-1.16.0               |       he04af86_2         1.5 MB
expat-2.4.4                |       h6c2663c_0         207 KB
fribidi-1.0.10             |       h62dcd97_0          63 KB
getopt-win32-0.1           |       h2bbff1b_0          19 KB
glib-2.69.1                |       h5dc1a3c_1         1.6 MB
graphite2-1.3.14           |       hd77b12b_1          91 KB
graphviz-2.50.0            |       hdb8b0d4_0         903 KB
gts-0.7.6                  |       h63ab5a1_3         181 KB
harfbuzz-4.3.0             |       hda2c7e1_0         676 KB
libffi-3.4.2               |       hd77b12b_4         107 KB
libgd-2.3.3                |       ha43c60c_1         314 KB
pango-1.50.7               |       h78c2152_0         279 KB
pcre-8.45                  |       hd77b12b_0         382 KB
pixman-0.40.0              |       h2bbff1b_1         402 KB
------------------------------------------------------------
                                       Total:         6.6 MB

The following NEW packages will be INSTALLED:

cairo pkgs/main/win-64::cairo-1.16.0-he04af86_2 expat pkgs/main/win-64::expat-2.4.4-h6c2663c_0 fribidi pkgs/main/win-64::fribidi-1.0.10-h62dcd97_0 getopt-win32 pkgs/main/win-64::getopt-win32-0.1-h2bbff1b_0 glib pkgs/main/win-64::glib-2.69.1-h5dc1a3c_1 graphite2 pkgs/main/win-64::graphite2-1.3.14-hd77b12b_1 graphviz pkgs/main/win-64::graphviz-2.50.0-hdb8b0d4_0 gts pkgs/main/win-64::gts-0.7.6-h63ab5a1_3 harfbuzz pkgs/main/win-64::harfbuzz-4.3.0-hda2c7e1_0 libffi pkgs/main/win-64::libffi-3.4.2-hd77b12b_4 libgd pkgs/main/win-64::libgd-2.3.3-ha43c60c_1 pango pkgs/main/win-64::pango-1.50.7-h78c2152_0 pcre pkgs/main/win-64::pcre-8.45-hd77b12b_0 pixman pkgs/main/win-64::pixman-0.40.0-h2bbff1b_1

Proceed ([y]/n)? y

Downloading and Extracting Packages fribidi-1.0.10 | 63 KB | ############################################################################ | 100% graphviz-2.50.0 | 903 KB | ############################################################################ | 100% expat-2.4.4 | 207 KB | ############################################################################ | 100% glib-2.69.1 | 1.6 MB | ############################################################################ | 100% pcre-8.45 | 382 KB | ############################################################################ | 100% cairo-1.16.0 | 1.5 MB | ############################################################################ | 100% libffi-3.4.2 | 107 KB | ############################################################################ | 100% pixman-0.40.0 | 402 KB | ############################################################################ | 100% harfbuzz-4.3.0 | 676 KB | ############################################################################ | 100% libgd-2.3.3 | 314 KB | ############################################################################ | 100% gts-0.7.6 | 181 KB | ############################################################################ | 100% graphite2-1.3.14 | 91 KB | ############################################################################ | 100% pango-1.50.7 | 279 KB | ############################################################################ | 100% getopt-win32-0.1 | 19 KB | ############################################################################ | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done Retrieving notices: ...working... done (base) PS C:\WINDOWS\system32>

xflr6 commented 2 years ago

@shashii82: for installing this package from PyPI, see https://graphviz.readthedocs.io/en/stable/manual.html#installation (you also need to install https://www.graphviz.org/download/ and make sure its dot binary is on your system PATH so you can render the DOT source produced by this Python libary).

For Anaconda users, there is a separate conda-forge distribution of this package (https://anaconda.org/conda-forge/python-graphviz), which should install and set-up the conda-forge distribution of Graphviz (https://anaconda.org/conda-forge/graphviz) into your Anaconda enviroment automatically if it is not installed (note that the the conda-forge distribution is a separate project, maintained at https://github.com/conda-forge/python-graphviz-feedstock).

Locking this issue as it seems to get confusing.