diff --git a/sphinxcontrib/versioning/sphinx_.py b/sphinxcontrib/versioning/sphinx_.py index a90587d4f..711138d8d 100644 --- a/sphinxcontrib/versioning/sphinx_.py +++ b/sphinxcontrib/versioning/sphinx_.py @@ -6,7 +6,14 @@ import os import sys -from sphinx import application, build_main, locale +from sphinx import application, locale + +try: + from sphinx import build_main +except ImportError: + # Python 3.6+ ImportError fix + from sphinx.cmd.build import build_main + from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.config import Config as SphinxConfig from sphinx.errors import SphinxError