I receive the following error message when I try to use the sphinx-quickstart generated make.bat command:
make html
Error: The languages module cannot be found. Did you install Sphinx and its dependencies correctly?
I tried running the sphinx-build command and received the same error.
I am using Python 2.6.4 on Windows Vista. 开发者_StackOverflow社区I have installed setuptools-0.6c11.win32-py2.6, and installed Sphinx 0.6.3 using easy_install.
It appears that init.py is failing when it tries to import cmdline (I grep'd part of the error message, and init.py was the only file that turned up) since the error shows up in the try
block that imports cmdline.
try:
from sphinx import cmdline
except ImportError, err:
errstr = str(err)
if errstr.lower().startswith('no module named'):
whichmod = errstr[16:]
hint = ''
if whichmod.startswith('docutils'):
whichmod = 'Docutils library'
elif whichmod.startswith('jinja'):
whichmod = 'Jinja library'
elif whichmod == 'roman':
whichmod = 'roman module (which is distributed with Docutils)'
hint = ('This can happen if you upgraded docutils using\n'
'easy_install without uninstalling the old version'
'first.')
else:
whichmod += ' module'
print >>sys.stderr, ('Error: The %s cannot be found. '
'Did you install Sphinx and its dependencies '
'correctly?' % whichmod)
if hint:
print >> sys.stderr, hint
return 1
raise
I do not see where "languages" would get passed as an argument, so I am confused at the error message. I have searched for a solution, but have turned up nothing.
Grepping through the sphinx package for "languages", the only relevant import is:
/usr/lib/pymodules/python2.5/sphinx/environment.py:from docutils.parsers.rst.languages import en as english
So most likely there's something wrong with your docutils installation. Admittedly, the error message would be more helpful if the full package path was reported.
精彩评论