0

I’m following the instructions in Installing Sphinx - Windows.

Python 2.7 has priority in my system path, but Python 3.8 is on my system. I installed Sphinx by typing:

"c:\Program Files\Python38\Scripts\pip" install -U sphinx

Pip reported no errors.

Then I entered the command sphinx-build --version and got: “ ‘sphinx-build’ is not recognized as an internal or external command,” etc.

I searched the Python38 directory (and children) for sphinx-build. It isn’t there, although C:\Program Files\Python38\Lib\site-packages contains lots of other files named sphinx*.*.

Next I searched C:\ for sphinx-build. It isn’t anywhere on the disk.

It appears that the Sphinx installer ran successfully but silently did something wrong, yielding an incomplete installation. It seems more likely that I did something wrong, but I don’t know what. Any ideas?

mzjn
  • 48,958
  • 13
  • 128
  • 248
Jonathan Sachs
  • 613
  • 8
  • 19
  • Python 2.x is end of life, so today you should only have Python 3 in your system path. – Lex Li Oct 21 '20 at 18:38
  • Really not relevant. I'm partly responsible for maintaining production applications which are written in Python 2. We have discussed migrating them, but it will take a major commitment of resources. Until that happens, Python 2.7 remains my primary tool for programming. – Jonathan Sachs Oct 21 '20 at 20:52
  • 1
    If you cannot put Python 3 in path, then you might call `c:\Program Files\Python38\python.exe -m sphinx` instead. Due to Windows UAC, the actual installation folder can vary (like [this one](https://stackoverflow.com/questions/34051388/windows-pip-installing-libraries-in-wrong-directory) mentioned). – Lex Li Oct 21 '20 at 21:44
  • I added Python 3.8 to the path in front of Python 2.7. I had to delete all of the Sphinx files and reinstall, but then the sphinx-build command worked correctly. // This is a workaround, not a fix, because I'll have to change the path again whenever I work on a Python 2.7 program. It makes the problem less urgent and probably easier to solve, though. Thank you. – Jonathan Sachs Oct 21 '20 at 23:25

0 Answers0