-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[init] Set backend to TkAgg if on macosx. Should Fix #14
- Loading branch information
Showing
1 changed file
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |