尝试构建CKAN文档时出现错误消息“没有名为‘sphinxthemeokfn’的主题”

2024-10-01 17:26:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我在virtualenv中安装了CKAN并激活了virtualenv,并且在pip requirements中安装了需求-文档.txt,但当我试图构建文档时,却出现了以下错误:

> python setup.py build_sphinx
...
sphinx.errors.ThemeError: no theme named 'sphinx-theme-okfn' found (missing theme.conf?)

Tags: pipno文档pybuildtxtvirtualenv错误
2条回答

我试了好几次上面的方法。我甚至升级了Babel和Pygments并再次尝试-但没有成功。一直都是同样的错误。最后我复制了一个名为主题.conf从https://github.com/rostock/opendata.hro/tree/master/ckan/doc/_themes/sphinx-theme-okfn到目录~/ckan/default/src/ckan/doc/\u themes/sphinx theme okfn;因此,我能够以某种方式运行sphinx并为Windows上的ckan1.8生成可读的文档。也许我的解决方法对别人有用?在

问题是CKAN使用的Sphinx主题不是CKAN git存储库的一部分,它有自己的git repo,它是CKAN git repo的submodule。因此,在生成文档之前,需要签出子模块:

> git submodule init
> git submodule update
> python setup.py build_sphinx

相关问题 更多 >

    热门问题