<div dir="ltr">You could sniff the python version in your IPython startup file.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 5, 2017 at 10:03 AM, Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I'm starting to make the transition from python 2.7.x to python 3.x (currently 3.6).  I've found that for my python 3.6 installation (via conda), the Qt4Agg backend doesn't work, but Qt5Agg does.  On the other hand, for python 2.7, Qt4Agg works, but Qt5Agg doesn't.  Of course it would be best if these issues were fixed (and there appear to be bug reports on this) but until that happens, is there a recommended way to set the backend other than editing the matplotlibrc file.  I tried setting the MPLBACKEND environment variable, but that didn't seem to work. I like using ipython --pylab, especially for quick plotting. I know I could start ipython and then do</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">import matplotlib</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">matplotlib.use("Qt5Agg")</div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">​etc., but that's kind of a pain.  Suggestions welcome.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Jon​</div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_-4051355352318924223gmail_signature"><div dir="ltr"><div><div dir="ltr">______________________________<wbr>__________________________<br>Jonathan D. Slavin                 Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>       60 Garden Street, MS 83<br>phone: <a href="tel:(617)%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a>       Cambridge, MA 02138-1516<br>cell: <a href="tel:(781)%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a>             USA<br>______________________________<wbr>__________________________<br><br></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/matplotlib-<wbr>users</a><br>
<br></blockquote></div><br></div>