Python pip - 安装包的文档? [英] Python pip - install documentation for packages?
问题描述
有没有办法安装/生成使用pip安装的软件包的文档?
Is there a way to install/generate the documentation for the packages installed using pip?
我希望为项目安装所有必需的软件包,以及所有相关的文档(例如,安装django时的Django文档,使用dateutil等的dateutil文档等)。
I wish to install all the required packages for a project, as well as all the associated documentation (e.g. Django documentation when installing django, dateutil documentation with dateutil etc.).
Pip需求文件是快速安装所需软件包的好方法项目,但如果我也可以安装所有相关的文档,那将会更好。
Pip requirements files are a great way of quickly installing the required packages for a project, but it would be even better if I could also install all the associated docs as well.
Ubuntu的Python包安装文件到/ usr / share / docs,但是pip似乎没有这样做。
Ubuntu Python packages install documentation to /usr/share/docs, but pip does not appear to do the same.
当我需要离线工作时,这些软件包的文档对我来说非常重要。
Documentation for these packages is important to me for when I need to work on projects offline.
推荐答案
我想你正在寻找一种等同于ruby自动的方式(除非被抑制)从安装的gems / packages生成rdoc。
I think you're looking for an equivalent to the way that ruby automatically (unless suppressed) generates rdoc from installed gems/packages.
在python中, 是 用于使用文档注释代码的标准化机制 - docstrings 与可选格式化。然而,没有一种从Python代码生成/存储文档的标准化方法。每个python包可能有一个不同的机制,所以不可能有一种方法来创建它。
In python, there is a standardized mechanism for annotating code with documentation -- docstrings with optional formatting. However there isn't a standardized way of generating/storing documentation from python code. Each python package may have a different mechanism, so there couldn't be a way for pip to generate it.
这篇关于Python pip - 安装包的文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!