summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
27f87d1)
For example, if your default backend is GTKAgg, but you don't have
$DISPLAY set, you can get:
RuntimeError: could not create GdkCursor object
import numpy as _numpy
try:
import matplotlib.pyplot as _pyplot
import numpy as _numpy
try:
import matplotlib.pyplot as _pyplot
-except ImportError as e:
+except (ImportError, RuntimeError) as e:
_pyplot = None
_pyplot_import_error = e
_pyplot = None
_pyplot_import_error = e