Jupyter notebook 使用nbsphinx运行sphinx
我刚刚开始使用sphinx,并使用命令成功地从.rst文件构建html页面Jupyter notebook 使用nbsphinx运行sphinx,jupyter-notebook,python-sphinx,Jupyter Notebook,Python Sphinx,我刚刚开始使用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
$ 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列表所示
(dummy) C:\Users\rata\someproject conda list
...
nbsphinx 0.4.3 py_0 conda-forge
...
我做错了什么?显然,问题出在sphinx
版本上。我用的是1.5.1版,升级到2.2.0版后一切都很好 我在一台新计算机上遇到此错误<代码>pip安装nbsphinx
已解决!