summaryrefslogtreecommitdiff
path: root/training/mira/mira.py
diff options
context:
space:
mode:
authorWaleed Ammar <wammar@cs.cmu.edu>2013-11-11 11:47:04 -0500
committerWaleed Ammar <wammar@cs.cmu.edu>2013-11-11 11:47:04 -0500
commite7b5356fb19d71d6ef1ad2f1d9a11d92bfe7f7b3 (patch)
treea7e4520a409d4dc12cda490fcc689525f4c22bd0 /training/mira/mira.py
parent23f3d8e92b9e4b53ea884bb33440885b61d15e02 (diff)
mira breaks on noninteractive machines when matplotlib is installed, complaining that $DISPLAY environment variable is not set. fix it as described at http://matplotlib.org/faq/howto_faq.html
Diffstat (limited to 'training/mira/mira.py')
-rwxr-xr-xtraining/mira/mira.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/training/mira/mira.py b/training/mira/mira.py
index 7b2d06a3..d5a1d9f8 100755
--- a/training/mira/mira.py
+++ b/training/mira/mira.py
@@ -12,6 +12,8 @@ except ImportError:
sys.exit(1)
have_mpl = True
try:
+ import matplotlib
+ matplotlib.use('Agg')
import matplotlib.pyplot as plt
except ImportError:
have_mpl = False