tags:

views:

86

answers:

1

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. 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.

A: 

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.

gsakkis
I did not have docutils installed. For some reason, I believed that docutils was part of the setuptools package. I too had grep'd for "languages" but I must have messed up the command because I didn't show any results.Thanks for the help!
Jason