Hi, I guess you installed Sphinx into user space. So python could not find the sphinx-build command. Please check how you installed it. And please do "sudo pip install Sphinx==1.8.5" if you'd like to run Sphinx under sudo.
FYI: Bot python2.7 and sphinx1.8 have been already deprecated. So it would be better to use newer ones. Thanks, Takeshi KOMIYA 2021年8月1日(日) 11:45 Ramesh Babu.R <rrbab...@gmail.com>: > > > Hi, We are facing an issue where "make html" fails when executing from "sudo > python" location. > Same command works when python was sourced without sudo. Any pointers would > be helpful. > > Fails when executing from sudo: > > [jenkins@jenkins BUILD_TAG_validate_Fri_Jul_30_15_31_30_2021_]$ sudo > /opt/cisco/aci/python2.7/bin/python > > Python 2.7.14 (default, Apr 12 2018, 19:30:39) > > [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import os > > >>> os.system('make html') > > sphinx-build -b html -d _build/doctrees . _build/html > > make: sphinx-build: Command not found > > make: *** [html] Error 127 > > 512 > > >>> > > Works without sudo: > > [jenkins@jenkins BUILD_TAG_validate_Fri_Jul_30_15_31_30_2021_]$ > /opt/cisco/aci/python2.7/bin/python > > Python 2.7.14 (default, Apr 12 2018, 19:30:39) > > [GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import os > > >>> os.system('make html') > > sphinx-build -b html -d _build/doctrees . _build/html > > Running Sphinx v1.8.5 > > loading pickled environment... done > > building [mo]: targets for 0 po files that are out of date > > building [html]: targets for 0 source files that are out of date > > updating environment: 0 added, 0 changed, 0 removed > > looking for now-outdated files... none found > > no targets are out of date. > > build succeeded. > > > > The HTML pages are in _build/html. > > > > Build finished. The HTML pages are in _build/html. > > 0 > > >>> > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sphinx-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/c8ee4c7f-dab8-43fd-8b64-b9cf8a6a0667n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAOf%3DtFYVGjZWbcKLbaj0w_yWJPnJJr6u8_SNU-0zJQFuA%40mail.gmail.com.