【发布时间】:2012-11-11 01:41:08
【问题描述】:
我需要使用 Sphinx 记录我的 Python 项目。但我不能使用autodoc。
当我配置我的项目时,我选择了“extension autodoc”选项,但现在如果我使用
.. autoclass:: Class
我得到一个错误:
ERROR: Unknown directive type "autoclass"
我配置了PYTHONPATH,现在好了。但是我已经有这个问题了。
我的索引文件是:
.. ATOM documentation master file, created by
sphinx-quickstart on Thu Nov 22 15:24:42 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to ATOM's documentation!
================================
Contents:
.. toctree::
:maxdepth: 2
.. automodule:: atom
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
我需要有人告诉我如何解决这个问题。
谢谢
【问题讨论】:
-
conf.py 的
extensions配置变量中是否包含“sphinx.ext.autodoc”?
标签: python-sphinx autodoc