diff --git a/uvplot/__init__.py b/uvplot/__init__.py index 01c3f39..e149267 100644 --- a/uvplot/__init__.py +++ b/uvplot/__init__.py @@ -1,5 +1,19 @@ + import matplotlib -matplotlib.use('TkAgg') + +# To avoid Runtime Error +# RuntimeError: Python is not installed as a framework. The Mac OS X backend +# will not be able to function correctly if Python is not installed as a framework. +# See the Python documentation for more information on installing Python as a +# framework on Mac OS X. Please either reinstall Python as a framework, or try +# one of the other backends. +# If you are using (Ana)Conda please install python.app and replace the use of +# 'python' with 'pythonw'. +# See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information. +# https://matplotlib.org/faq/osx_framework.html + +if matplotlib.get_backend().lower() == 'macosx': + matplotlib.use('TkAgg') from .uvtable import UVTable -from .constants import arcsec \ No newline at end of file +from .constants import arcsec