小编kei*_*san的帖子

由于缺少 pandoc,构建文档失败

问题

在 readthedocs.io 网络界面上单击“构建”时,我无法成功构建我的文档,但它在我的本地机器上构建得很好。为了测试这是一个环境问题,我创建了一个虚拟环境:

conda create virtualenv -n venv
conda env export -n venv
source activate venv
Run Code Online (Sandbox Code Playgroud)

然后我将我的 requirements.txt 文件安装为:

pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)

然后跑了

make clean html
Run Code Online (Sandbox Code Playgroud)

在虚拟环境和在线 buildthedocs 中,我收到错误消息:

Notebook error:
PandocMissing in ex_degassing.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
http://pandoc.org/installing.html
make: *** [html] Error 2
Run Code Online (Sandbox Code Playgroud)

我已经搜索并搜索了一个解决方案,但我最好的猜测是 pandoc 没有通过 pip 安装,即使它在 requirements.txt 文件中。我还尝试通过在我的 requirements.txt 文件中替换pandocwith来告诉它从源代码构建git+git://github.com/jgm/pandoc#egg=pandoc,但这不起作用(请参阅下文了解我的文件的外观)。我可以轻松地在本地机器上安装 pandoc,但无法通过我的虚拟环境或 readthedocs 中的 requirements.txt 文件进行安装。

我的一些文件

这是我的requirements.txt文件:

sphinx>=1.4
sphinx_rtd_theme
ipykernel
nbsphinx
pandas
pandoc
numpy …
Run Code Online (Sandbox Code Playgroud)

python pandoc requirements.txt read-the-docs

7
推荐指数
3
解决办法
597
查看次数

标签 统计

pandoc ×1

python ×1

read-the-docs ×1

requirements.txt ×1