-
Notifications
You must be signed in to change notification settings - Fork 529
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
Don't use matplotlib in a GUI-dependent fashion #1635
Comments
perhaps the error that you are seeing is outside of the typical use case and should be handled separately. do you get the same error if you try one of the interfaces that uses matplotlib. |
ah, I believe this is a nipy issue. |
I will comment here to avoid opening something potentially useless. I'd rather not have to add matplotlib.use('agg') at some place matplotlib can be imported. I had no issue with mpl 1.5.1, but i now do in 1.5.3. I am actually building matplotlib myself so i figured i would disable tkagg backend at build time.
to
And yet, setup.py is still saying Is there no way anymore to use 'just agg' without having to specify anything in each script? |
Maybe something is wrong with your matplotlib build? I also build it myself (seeing as I am using Gentoo, I build all packages), and I have successfully and very easily deactivted the
There's even a live pakage for matplotlib in Gentoo, so if you want to build matplotlib yourself and work in a highly customized environment and/or on the cutting edge, I would really recommend Gentoo. However, it seems the Gentoo package (below) is doing exactly what you described you were doing manually (the relevant section is under
|
On my headless data analysis servers, on which I do not need and have disabled GUI support, I get this error from nipype. It seems matplotlib's default behaviour here is to use tkinter (a GUI package) for plotting.
Since from what I can tell we only use
plt.show
intools/make_examples.py
I suggest prepending all othermatplotlib.pyplot
imports with:As shown here. I can implement this easily enough myself.
This will indeed add cairo as a dependency, but we already depend on pygraphviz, which already depends on graphviz, which already depends on cairo. Also, we will no longer depend on tkinter support for the python core package.
What do you guys think?
The text was updated successfully, but these errors were encountered: