Skip to content

Commit

Permalink
Give helpful message in case Matplotlib isn't working
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Bastovanovic committed Nov 24, 2018
1 parent 654e53c commit f735472
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spinup/utils/plot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import seaborn as sns
import sys
try:
import seaborn as sns
except ImportError as e:
if "Python is not installed as a framework" in str(e):
print("It looks like you are using OSX and Anaconda setup, without "
"Matplotlib properly configured. \nIssuing this from the command "
"line should fix the problem:\n"
"echo \"backend: TkAgg\" >> ~/.matplotlib/matplotlibrc\n"
"For more info see "
"https://github.com/openai/spinningup/issues/1\n")
sys.exit(2)
import pandas as pd
import matplotlib.pyplot as plt
import json
Expand Down

0 comments on commit f735472

Please sign in to comment.