From e8b2a21430e883b677140a9b12164017b6ef4c7c Mon Sep 17 00:00:00 2001 From: Trevor Bedford Date: Wed, 11 Oct 2017 13:31:29 -0700 Subject: [PATCH] Add notes on matplotlib backend on OSX. Also update gitignore. --- .gitignore | 8 +++++++- docs/README.md | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d5dd6c9d5..55c8fa6c3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,13 @@ test_input/ test_output/ scratch/ +# For Python # +############## +*.pyc +.tox/ +.cache/ +augur.egg-info/ + # Compiled source # ################### *.com @@ -22,7 +29,6 @@ scratch/ *.exe *.o *.so -*.pyc # OS generated files # ###################### diff --git a/docs/README.md b/docs/README.md index b4bf6e8db..3c099bf6d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -41,3 +41,18 @@ the `-r` flag to force it to rebuild its environment. ```bash tox -r ``` + +Note that on OS X, matplotlib may throw errors during testing stating + +```bash +from matplotlib.backends import _macosx +E RuntimeError: Python is not installed as a framework. +``` + +This can be resolved by switching matplotlib backends. Create a file in the home directory `~/.matplotlib/matplotlibrc` and include the following: + +```python +backend: TkAgg +``` + +This should fix the error.