运行 狮身人面像与 nbsphinx

Running sphinx with nbsphinx

我刚刚开始使用 sphinx,并使用以下命令从 .rst 文件成功构建了 html 页面

$ sphinx-build -b html source build

因为我的目标是从 Jupyter 笔记本创建页面,所以我想使用 nbsphinx。但是,如果我在将 nbsphinx 添加到 conf.py 的扩展名后尝试 运行 提到的命令,我会收到以下错误消息

Could not import extension nbsphinx (exception: No module named 'sphinx.transforms.post_transforms')

已经安装了nbsphinx,如conda list所示

(dummy)  C:\Users\rata\someproject conda list

...
nbsphinx                  0.4.3                      py_0    conda-forge
...

我做错了什么?

显然,我的问题出在 sphinx 版本上。我使用的是 1.5.1 版本,更新到 2.2.0 后一切正常!