Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The 'sphinx-build' command was not found.

This was our processes of installing Sphinx.

> choco install python -y -f > pip install sphinx 

We know that sphinx installed because of the following output.

> pip show sphinx --- Metadata-Version: 2.0 Name: Sphinx Version: 1.4.3 Summary: Python documentation generator Home-page: http://sphinx-doc.org/ Author: Georg Brandl Author-email: [email protected] License: BSD Location: c:\programdata\chocolatey\lib\python3\tools\lib\site-packages 

We also added its install location to our PATH.

c:\programdata\chocolatey\lib\python3\tools\lib\site-packages 

Even so, running sphinx-build does not work.

'sphinx-build' is not recognized as an internal or external command, operable program or batch file. 
like image 481
Shaun Luttin Avatar asked Jun 10 '16 21:06

Shaun Luttin


People also ask

What is Sphinx-build?

sphinx-build generates documentation from the files in <sourcedir> and places it in the <outputdir> . sphinx-build looks for <sourcedir>/conf.py for the configuration settings. sphinx-quickstart(1) may be used to generate template files, including conf.py . sphinx-build can create documentation in different formats.


2 Answers

I stumbled into that problem too when installed Sphinx using pip. The problem was solved using the installation way proposed by official documentation:

For Python 3:

$ apt-get install python3-sphinx 

For Python 2:

$ apt-get install python-sphinx 
like image 93
Symon Avatar answered Sep 19 '22 13:09

Symon


For macOS Mojave:

$ brew install sphinx-doc 

upon install brew will notify you to add it to your path, so add the following line to your ~/.bash_profile:

export PATH="/usr/local/opt/sphinx-doc/bin:$PATH" 

after that you can run the sphinx-build command (you can verify this by for example checking the version)

$ sphinx-build --version sphinx-build 2.0.1 
like image 38
Kim Paulissen Avatar answered Sep 22 '22 13:09

Kim Paulissen