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

hack / fix for dealing with graphviz .bat issue where space is in path #262

Open
rsokl opened this issue Jul 22, 2020 · 10 comments
Open

hack / fix for dealing with graphviz .bat issue where space is in path #262

rsokl opened this issue Jul 22, 2020 · 10 comments
Labels
documentation Regarding either the RTD page or the source documentation

Comments

@rsokl
Copy link
Owner

rsokl commented Jul 22, 2020

Find dot.bat file in env. E.g. at "C:\Users\Ryan S\.conda\envs\week3\Library\bin\dot.bat"

And edit it. The original file will contain

%~dp0.\graphviz\dot.exe %* 

Add quotes as so:

"%~dp0.\graphviz\dot.exe" %* 

and save - this should fix it

@rsokl rsokl added the documentation Regarding either the RTD page or the source documentation label Jul 22, 2020
@rsokl
Copy link
Owner Author

rsokl commented Jul 22, 2020

Documented here: conda-forge/graphviz-feedstock#43

@Nikhilkohli1
Copy link

Hi, I am getting this error while running this. Can you please take a look?

CalledProcessError: Command '['dot', '-Tpng', '-O', 'simple_diagram']' returned non-zero exit status 1. [stderr: b'Format: "png" not recognized. Use one of:\r\n']

@rsokl
Copy link
Owner Author

rsokl commented Sep 10, 2020

I am not familiar with this issue, but it looks like your supported "devices" available in graphviz is empty. How did you install graphviz?

Perhaps this thread is relevant to you.

@petarmhg have you seen this?

@Nikhilkohli1
Copy link

Okay, thanks for your quick response.

I installed graphviz in windows using below cmd -

conda install -c conda-forge graphviz xorg-libxrender xorg-libxpm
pip install graphviz

I will check the threat provided by you. Thanks

@rsokl
Copy link
Owner Author

rsokl commented Sep 10, 2020

I think that there might be an issue with you installing graphviz twice - once with conda and once with pip. I suspect that your pip-installed graphviz is the culprit here.

It should be sufficient to run

conda install graphviz
conda install python-graphviz

@Nikhilkohli1
Copy link

Okay, Let me uninstall it and re-run this

@Nikhilkohli1
Copy link

That worked like a charm. Thanks a lot!

@rsokl
Copy link
Owner Author

rsokl commented Sep 10, 2020

Awesome :) Hope you enjoy mygrad!

@rsokl rsokl closed this as completed Sep 10, 2020
@petarmhg
Copy link
Collaborator

@rsokl just for future reference: I believe you're right about the installing graphviz twice. conda install python-graphviz and pip install graphviz will install the same python bindings for graphviz, while conda install graphviz installs the graphviz software itself. Using both conda install graphviz and pip install graphviz (I assume) leads to some naming conflicts.

If using pip install graphviz to install the python bindings, then graphviz itself would need to be installed via one of these

@rsokl
Copy link
Owner Author

rsokl commented Sep 12, 2020

(reopening because this is useful to reference)

@rsokl rsokl reopened this Sep 12, 2020
@rsokl rsokl pinned this issue Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Regarding either the RTD page or the source documentation
Projects
None yet
Development

No branches or pull requests

3 participants