Skip to content

Commit 9665862

Browse files
committed
Add backends tot eh matplotlib deferred imports
1 parent 754de41 commit 9665862

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyomo/common/dependencies.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,8 @@ def _finalize_matplotlib(module, available):
963963
if in_testing_environment():
964964
module.use('Agg')
965965
import matplotlib.pyplot
966+
import matplotlib.pylab
967+
import matplotlib.backends
966968

967969

968970
def _finalize_numpy(np, available):
@@ -1069,7 +1071,7 @@ def _pyutilib_importer():
10691071
matplotlib, matplotlib_available = attempt_import(
10701072
'matplotlib',
10711073
callback=_finalize_matplotlib,
1072-
deferred_submodules=['pyplot', 'pylab'],
1074+
deferred_submodules=['pyplot', 'pylab', 'backends'],
10731075
catch_exceptions=(ImportError, RuntimeError),
10741076
)
10751077

0 commit comments

Comments
 (0)