Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydot would not work until I installed graphviz on macOS #141

Open
ghost opened this issue Feb 23, 2021 · 2 comments
Open

pydot would not work until I installed graphviz on macOS #141

ghost opened this issue Feb 23, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 23, 2021

Steps

  • I have a small prov script that I know works

  • On a system that DOESN'T have prov installed, running the script resulted in:
    ModuleNoteFoundError: No module named 'prov'
    as expected.

  • I ran:
    pip3 install "prov[dot]"
    (in quotes because of how zsh handles '[]')

  • Running the script again, I get:
    FileNotFoundError: [Errno 2] "dot" not found in path

After a bit of searching, I found that installing graphviz may be necessary, so I ran:
brew install graphviz
which came with a number of dependencies of its own.

The script was then able to run correctly and produce the graph.

Could the graphviz dependancy be addressed in the package?

Many thanks

@ghost
Copy link
Author

ghost commented Feb 23, 2021

I recreated the steps on another Mac that had not had the prov package or graphviz installed before and verified that the exact same issues occurred with the same steps taken to resolve.

@trungdong
Copy link
Owner

You are right, the [dot] option only install the required Python package to allow exporting the "dot" format. Graphviz is required to convert the exported dot representation to a graphical format, like PNG or SVG.

Unfortunately, Graphviz cannot be installed via Python. As you found, you can install it with homebrew on Mac (which does not come installed as default, BTW). On Windows or Linux, installation instructions would be different.

In later releases, I will make it clear about the requirement of Graphviz in some use cases and point users to https://graphviz.org/download/ for installation instruction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant