https://github.com/pypa/setuptools/issues/510 https://github.com/Python-Markdown/markdown/blob/ada40c6619fd0be740af646b043937e560716c95/markdown/core.py#L26 One potential fix (that I have implemented manually) is to move the import statement inside https://github.com/Python-Markdown/markdown/blob/ada40c6619fd0be740af646b043937e560716c95/markdown/core.py#L154 and add an if statement to check it has already been imported and assigned as an instance variable.