Python – make: ../bin/sphinx-build:命令未找到 解決辦法

來源:互聯網
上載者:User

我之前用easy_install pyquery安裝了pyquery這個架構,但是發現沒有文檔,因此我去它的網站下了一份原始碼,幸好裡面有docs檔案,開啟看了下,是還沒有編譯的,於是在終端中輸入make:

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery/docs$ make Please use `make <target>' where <target> is one of html to make standalone HTML files pickle to make pickle files json to make JSON files htmlhelp to make HTML files and a HTML help project latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter changes to make an overview over all changed/added/deprecated items linkcheck to check all external links for integrity

提示要帶參數,我們需要輸出html的,所以就輸入make html:

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery/docs$ make htmlmkdir -p _build/html _build/doctrees../bin/sphinx-build -b html -d _build/doctrees . _build/htmlmake: ../bin/sphinx-build:命令未找到make: *** [html] 錯誤 127

提示sphinx-build沒有找到,說明它使用到什麼東西,我們沒有安裝,google了一下,原來是一個python的庫,於是在終端輸入 sudo easy_install Sphinx,安裝成功了。 再次在終端中輸入make html 但是還是同樣的錯誤,看了下它../bin/sphinx-build,看來它把人家sphinx當成自己的一個檔案夾了,好吧,我們直接用sphinx-build命令對docs檔案夾產生html吧,在終端中輸入:sphinx-build 需要編譯的docs檔案夾 輸出的目錄

huangjacky@huangjacky-laptop:~/program/code/Python_Framework/pyquery$ sphinx-build docs htmlMaking output directory...Running Sphinx v1.1.3loading pickled environment... not yet createdNo builder selected, using default: htmlbuilding [html]: targets for 11 source files that are out of dateupdating environment: 11 added, 0 changed, 0 removedTraceback (most recent call last):  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object __import__(self.modname) File "/usr/local/lib/python2.7/dist-packages/pyquery-1.2.1-py2.7.egg/pyquery/ajax.py", line 6, in <module> from webob import Request, ResponseImportError: No module named webobreading sources... [100%] traversing /home/huangjacky/program/code/Python_Framework/pyquery/docs/ajax.txt:4: WARNING: autodoc can't import/find module 'pyquery.ajax', it reported error: "No module named webob", please check your spelling and sys.path/home/huangjacky/program/code/Python_Framework/pyquery/docs/ajax.txt:54: WARNING: don't know which module to import for autodocumenting u'PyQuery' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)/usr/local/lib/python2.7/dist-packages/pyquery-1.2.1-py2.7.egg/pyquery/pyquery.py:docstring of pyquery.pyquery.PyQuery.html:9: WARNING: Inline literal start-string without end-string.looking for now-outdated files... none foundpickling environment... donechecking consistency... donepreparing documents... donewriting output... [100%] traversing writing additional files... genindex py-modindex searchcopying static files... WARNING: html_static_path entry '/home/huangjacky/program/code/Python_Framework/pyquery/docs/_static' does not existdonedumping search index... donedumping object inventory... donebuild succeeded, 4 warnings.

輸出了一大段的提示,但是可以看到最後提示build succeeded,哈哈發現和docs同目錄下已經產生了html檔案夾。 搞定了。 至於pyquery是幹什麼的,大家可以看這裡。 以後有時間的話,我會寫幾個例子來講解它的用法。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.