简体   繁体   English

IPython指令在构建文档期间创建损坏的输出

[英]Ipython directive creates corrupted output during building docs

I want to build docs using sphinx and ipython directive. 我想使用sphinx和ipython指令构建文档。 I try on simple command in .rst document: 我尝试在.rst文档中使用简单命令:

.. ipython:: python

    import datatable as dt
    DT = dt.Frame(A=range(5))
    DT

In jupyter notebook results look well: 在jupyter笔记本中,结果看起来不错:

在此输入图像描述

but during building make html results corrupted: 但是在构建过程中,使html结果损坏:

在此输入图像描述

what could be the reason? 可能是什么原因?

It works well with pandas or python. 它适用于熊猫或python。

Make sure to add the needed extensions in your conf.py : 确保在conf.py添加所需的扩展名:

extensions = ['IPython.sphinxext.ipython_console_highlighting',
              'IPython.sphinxext.ipython_directive']

ipython中的已知问题是发布的链接: https : //github.com/ipython/ipython/issues/11424

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM