2010-01-01 26 views
1

我收到以下错误消息时我尝试使用狮身人面像,快速入门产生MAKE.BAT命令:狮身人面像0.6.3:这些语言模块无法找到

将HTML

Error: The languages module cannot be found. Did you install Sphinx and its dependencies correctly?

我试着运行sphinx-build命令并收到相同的错误。

我在Windows Vista上使用Python 2.6.4。我已经安装了setuptools-0.6c11.win32-py2.6,并使用easy_install安装了Sphinx 0.6.3。

看来,初始化时,它尝试导入CMDLINE的.py失败(我grep'd错误消息的一部分,初始化的.py是止跌回升的唯一文件),因为错误显示出来在导入cmdline的try块中。

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 

我看不到“语言”作为参数传递的位置,所以我对错误消息感到困惑。我已经寻找解决方案,但一无所获。

回答

0

通过狮身人面像包“语言” Grepping,唯一相关的进口是:

/usr/lib/pymodules/python2.5/sphinx/environment.py:from docutils.parsers.rst.languages import en as english 

所以最有可能有一些错误的docutils的安装。无可否认,如果报告完整的软件包路径,错误信息会更有帮助。

+0

我没有安装docutils。出于某种原因,我相信docutils是setuptools软件包的一部分。我也对grep'd“语言”,但我一定搞乱了命令,因为我没有显示任何结果。 感谢您的帮助! – Jason 2010-01-02 17:22:11