Closed AnirudhDagar closed 2 years ago
The issue is caused by version import in setup.py - even if sphinx dependency is present in requirements, it won't be installed prior because setup is broken: https://github.com/d2l-ai/d2l-book/blob/master/setup.py#L2
@gradientsky it's actually not the d2lbook setup. It is the mxtheme setup that is broken because it has a hard requirement on sphinx inside init.py file. And during it's setup, just to get the version the following line:
from mxtheme import __version__
throws an error because as soon as mxtheme is imported, init is invoked. Even though design wise I do not advocate importing the package in the setup.py file, and I'm totally with you on that, but here d2lbook
init file doesn't depend on anything so technically it should run without issues.
I can send a fix in mxtheme
for this, requiring sphinx at install time and using a better design to read version in setup.py
. cc @mli @astonzhang
When installing d2lbook in a completely new environment with sphinx not cached by previous pip installations, the following error is raised:
Attaching an example failed CI Log here. This is because d2lbook depends on sphinx and mxtheme is also one of the d2lbook dependencies which depends on sphinx.