Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X install of Sphinx: The 'sphinx-build' and 'sphinx-quickstart' not found

There have been several 'unanswered' postings on this topic pertaining finding 'sphinx-build' not being able to be found: sphinx-build -h command not found in Mac OS

Sphinx was installed upon OSX using both:

  • python3 -m pip install sphinx
  • brew install sphinx

In either case, both commands sphinx-build and sphinx-quickstart cannot be found.

Even though python3 -m pip freeze shows installation:

Sphinx==1.3.6

What am I missing?

Thx

like image 640
jeff00seattle Avatar asked Mar 21 '16 17:03

jeff00seattle


2 Answers

For homebrew, the tools seem to be in sphinx-doc nowadays. And it's not by default put in your PATH either because sphinx-doc is "keg-only". To install it and get it into PATH, you can do:

brew install sphinx-doc
brew link sphinx-doc --force

For full disclosure to the reader, I will include the keg-only warning brew emits when --force is not used:

Warning: sphinx-doc is keg-only and must be linked with --force
Note that doing so can interfere with building software.

I don't know why sphinx-doc is keg-only, but putting sphinx-{quickstart,apidoc,autogen,build} in PATH seems harmless to me.

like image 182
scode Avatar answered Sep 21 '22 09:09

scode


I had a similar issue after installing sphinx on OS X El Capitan. I installed sphinx using pip: pip install sphinx --user. Despite the sphinx-build binary existing in ~/Library/Python/2.7/bin, the command could not be found.

The issue was that I had path set to PATH="~/Library/Python/2.7/bin:$PATH". Replacing the tilde ~ with $HOME so that it was PATH="$HOME/Library/Python/2.7/bin:$PATH" fixed the problem for me.

like image 20
Dan Murphy Avatar answered Sep 18 '22 09:09

Dan Murphy