Skip to content

Commit 1f896f4

Browse files
committed
Add warning for matplotlib in virtual env on Mac
1 parent 46ad899 commit 1f896f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

axelrod/plot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from numpy import arange, median, nan_to_num
2+
import warnings
23

34
matplotlib_installed = True
45
try:
@@ -8,7 +9,9 @@
89
from mpl_toolkits.axes_grid1 import make_axes_locatable
910
except ImportError:
1011
matplotlib_installed = False
11-
12+
except RuntimeError:
13+
matplotlib_installed = False
14+
warnings.warn('matplotlib does work with virtual environments on MacOS.')
1215

1316
def default_cmap():
1417
"""Sets a default matplotlib colormap based on the version."""

0 commit comments

Comments
 (0)