sprin / markdown-inline-graphviz

Render inline graphs with Markdown and Graphviz
MIT License
34 stars 22 forks source link

MkDocs Error #1

Closed davesgonechina closed 8 years ago

davesgonechina commented 8 years ago

Pip install successful but MkDocs spits out the following on the example from the readme:

Error : [Errno 2] No such file or directory : [u'dot', u'-Tsvg']

sprin commented 8 years ago

Thanks for reporting!

The graphviz system package must be installed. sudo apt-get install graphviz.

I will update README.

kyleomalley commented 8 years ago

i need some way to generate these images natively in python (without any OS-specific binaries in the way).

sprin commented 8 years ago

@kyleomalley: There are various Python bindings to Graphviz you can check out:

pygraphviz graphviz-python pydot

There's no pure Python alternative to Graphviz that I am aware of. Graphviz is written in C, and either the binaries or the shared library must be installed on the system to use it.

Here's how pydot locates the Graphviz executables in a platform-independent way: https://github.com/erocarrera/pydot/blob/master/pydot.py#L405

davesgonechina commented 8 years ago

Installing graphviz took care of the error, but now mkdocs is simply ignoring the Dot code.

sprin commented 8 years ago

Is the extension enabled in mkdocs.yml?

Can you try a doc containing only the example graph code shown in the README? Also, do you see any errors when invoking dot on a graph code file from the command line?

davesgonechina commented 8 years ago

There were no errors, the extension was enabled in mkdocs.yml, but rebooting the server did the trick. Thanks!

sprin commented 8 years ago

I can't vouch for rebooting as a solution, but it's possible that the Graphviz binaries were not on the PATH after installation until you opened a new shell.

@kyleomalley: If you need any more help with cross-platform support, open a new ticket and we can investigate further.

Closing.