Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8221ab

Browse files
author
Víctor Terrón
committed
Show custom error message if we don't have a matplotlib installation
1 parent b236b0f commit d8221ab

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

doc/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
# other places throughout the built documents.
4848
#
4949
# The short X.Y version.
50-
import matplotlib
50+
try:
51+
import matplotlib
52+
except ImportError:
53+
msg = "Error: matplotlib must be installed before building the documentation"
54+
sys.exit(msg)
55+
5156
version = matplotlib.__version__
5257
# The full version, including alpha/beta/rc tags.
5358
release = version

0 commit comments

Comments
 (0)