I want to build html docs using a virtualenv instead of the native environment on my machine.
I\'ve entered the virtualenv but when I run make html
I get e
I had the same problem, but I couldn't use the accepted solution because I didn't use the Makefile. I was calling sphinx-build
from within a custom python build file. What I really wanted to do was to call sphinx-build
with the exact same environment that I was calling my python build script with. Fiddling with paths was too complicated and error prone, so I ended up with what seems to me like an elegant solution, which is to "manually" load the console script entry point and call it:
from pkg_resources import load_entry_point
cmd = load_entry_point('Sphinx', 'console_scripts', 'sphinx-build')
cmd(['sphinx-build', basepath, destpath])