You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the following G'MIC commands on a display-less system (WSL Ubuntu 20.04), gmic-py (2.9.2 from PyPI) still prints a message out about not being able to display images because of missing matplotlib or ipython dependencies
importgmic; gmic.run("sp lena blur 10 output lena.png")
Outputs
gmic-py: Working in display-less mode.
gmic.GmicException: Could not use matplotlib neither ipython to try to display images
The text was updated successfully, but these errors were encountered:
Maybe a setting to run G'MIC in a silent mode would be an option to pass to a G'MIC instance when creating one. That way, the stdout and stderr don't get polluted. I don't know if this is already possible, but I couldn't find anything in the documentation of gmic-py. Something like this would be helpful:
importgmicgmicInstance=gmic.Gmic(silent=True)
As a temporary fix, I redirect both stdout for the display-less mode message and stderr for the dependencies' error while executing G'MIC commands like so:
importgmicimportcontextlibimportiof=io.StringIO()
withcontextlib.redirect_stderr(f):
withcontextlib.redirect_stdout(f):
gmic.run("sp lena blur 10 output lena.png")
When running the following G'MIC commands on a display-less system (
WSL Ubuntu 20.04
),gmic-py
(2.9.2 from PyPI) still prints a message out about not being able to display images because of missingmatplotlib
oripython
dependenciesOutputs
The text was updated successfully, but these errors were encountered: