diff --git a/object_attribute_classifier_cached_features/compute_AP.py b/object_attribute_classifier_cached_features/compute_AP.py
index 094304746bde515235d8b94dcc5c109b065bf0a5..825fe27595e9cf23c75da538107c7e4b7d32fcb8 100644
--- a/object_attribute_classifier_cached_features/compute_AP.py
+++ b/object_attribute_classifier_cached_features/compute_AP.py
@@ -1,6 +1,8 @@
 import os
 import pdb
 import ujson
+import matplotlib
+matplotlib.use('pdf')
 import matplotlib.pyplot as plt
 import numpy as np
 import constants