Skip to content

Commit

Permalink
[init] Set backend to TkAgg if on macosx. Should Fix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
mtazzari committed Oct 6, 2017
1 parent 6b8f7c0 commit f98e521
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions uvplot/__init__.py
Original file line number Diff line number Diff line change
@@ -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
from .constants import arcsec

0 comments on commit f98e521

Please sign in to comment.