I am trying to create plots with matplotlib and show them in my django app. I 'plotted' the plot to a BytesIO 'file' using plt.savefig(), which I then converted to base64 and then passed that string to my template. This was working fine in the default Django 1.10 (Python 2.7) environment.
I created a virtualenv for Django 1.11 (I wanted a feature that's new to Django 1.11), and then I encountered a problem with this process.
I got this error;
TclError at ..... no display name and no $DISPLAY environment variable
I tried setting this variable manualy in a few different ways (without any sucess) including using;
os.environ
Is there something that the default environment (Django 1.10, Python 2.7) has set up that mitigates this issue, that I'm not aware of?