Open rachka opened 8 years ago
In test_homework4.py, if you insert following lines before import matplotlib.pyplot as plt
, it should work:
import matplotlib
matplotlib.use('Agg')
I found this in an AMATH website on setting up SageMathCloud http://faculty.washington.edu/rjl/classes/am574w2015/smc.html
This is the second solution for plotting graphs. create a file ~/.config/matplotlib/matplotlibrc containing:
backend : Agg
Works for me.
Yeah it definitely did work. Thanks for the fix.
Thank you to @akihis2 and @jasheetz for figuring this out.
The problem is that SMC doesn't support the default Matplotlib image rendering system because, after all, there is no windowing system on SMC. Apparently my attempt to use plt.savefig()
is insufficient because Matplotlib needs to first generate the default, "windowed" plot before saving it.
I'll create a patch using @akihis2 's fix in test_homework4.py
.
As soon as I pulled from my private repo to SMC and ran
pip install mpi4py
and alsomake lib
, I attempted to runpython test_homework4.py
and received the following message:QXcbConnection: Could not connect to display Aborted (core dumped)