歡迎Follow我的GitHub:https://github.com/SpikeKing.
本文地址:http://blog.csdn.net/caroline_wendy/article/details/77089644
Sphinx 是Python的文檔生成工具
在Mac上安裝時,使用pip無法安裝成功,即使提示已安裝完成,也無法使用。
sudo pip --default-timeout=100 install Sphinx -i http://mirrors.aliyun.com/pypi/simple
報錯,無法找到sphinx-build
命令:
sphinx-build -b html -d _build/doctrees -a . _build/html
Error: The markupsafe module cannot be found. Did you install Sphinx and its dependencies correctly?
make: *** [html] Error 1
切換安裝方式,使用easy_install
安裝,即可
sudo easy_install -U sphinx
再調用文檔生成命令
make html
進入文檔目錄
cd _build/html
open .
點擊index.html,就可以查看文檔