Python Sphinx 0.6.3:找不到语言模块
尝试使用sphinx quickstart生成的make.bat命令时,我收到以下错误消息: 制作html 错误:找不到语言模块。您是否正确安装了Sphinx及其依赖项 我尝试运行sphinx构建命令,但收到了相同的错误 我正在Windows Vista上使用Python 2.6.4。我已经安装了setuptools-0.6c11.win32-py2.6,并使用easy_安装安装了Sphinx 0.6.3 init.py在尝试导入cmdline时似乎失败了(错误消息的一部分,并且init.py是唯一出现的文件),因为导入cmdline的Python Sphinx 0.6.3:找不到语言模块,python,python-sphinx,Python,Python Sphinx,尝试使用sphinx quickstart生成的make.bat命令时,我收到以下错误消息: 制作html 错误:找不到语言模块。您是否正确安装了Sphinx及其依赖项 我尝试运行sphinx构建命令,但收到了相同的错误 我正在Windows Vista上使用Python 2.6.4。我已经安装了setuptools-0.6c11.win32-py2.6,并使用easy_安装安装了Sphinx 0.6.3 init.py在尝试导入cmdline时似乎失败了(错误消息的一部分,并且init.py是
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
我不知道“语言”在哪里会作为参数传递,所以我对错误消息感到困惑。我搜索了一个解决方案,但没有找到任何结果。在sphinx软件包中搜索“语言”,唯一相关的导入是:
/usr/lib/pymodules/python2.5/sphinx/environment.py:from docutils.parsers.rst.languages import en as english
因此,您的docutils安装很可能有问题。诚然,如果报告完整的包路径,错误消息将更有帮助。我没有安装docutils。出于某种原因,我认为docutils是setuptools包的一部分。我对“语言”也有grep'd,但我一定是把命令搞乱了,因为我没有显示任何结果。谢谢你的帮助!