Python jupyter_sphinx:linenos:选项没有任何效果
以下是一个简单的配方:Python jupyter_sphinx:linenos:选项没有任何效果,python,jupyter,python-sphinx,Python,Jupyter,Python Sphinx,以下是一个简单的配方: 通过Sphinx quickstart在空根目录中创建最简单的Sphinx项目 让一切都处于默认状态 将“jupyter_sphinx”添加到conf.py中的扩展列表中 根据扩展的文档,向index.rst添加一个简单的Python代码块: 在根目录下创建html 结果index.html不显示任何行号。我已尝试启用配置选项jupyter\u sphinx\u linenos和jupyter\u sphinx\u continue\u linenos,但没有效果。这里少
jupyter\u sphinx\u linenos
和jupyter\u sphinx\u continue\u linenos
,但没有效果。这里少了什么
jupyter\u sphinx
version->0.2.4问题可能是您需要在conf.py
中添加扩展=[“jupyter\u sphinx.execute”]
。我无法重现错误。问题可能是您需要在conf.py
中添加扩展=[“jupyter\u sphinx.execute”]
。我无法重现错误。我能够重现问题(Python 3.8.0、Sphinx 3.1.2、jupyter_Sphinx 0.2.4)。使用extensions=[“jupyter\u sphinx.execute”]
,我收到了以下警告:“在设置扩展名jupyter_sphinx.execute时:jupyter sphinx
已使用jupyter_sphinx.execute
子模块初始化。将其替换为jupyter_sphinx。使用jupyter_sphinx.execute初始化将在0.3版中删除。我能够重现该问题(Python 3.8.0、sphinx 3.1.2、jupyter_sphinx 0.2.4)。使用扩展=[“jupyter_sphinx.execute”]
,我得到以下警告:设置扩展名jupyter_sphinx.execute时:jupyter sphinx
已使用jupyter_sphinx.execute
子模块初始化。将其替换为jupyter_sphinx。使用jupyter_sphinx.execute初始化将在0.3版中删除。
.. jupyter-execute::
:linenos:
print('foo')
print('bar')
print('baz')