Sphinx 编译文档失败

简介: Sphinx 编译文档失败

1.错误现象


今日编译文档,遇到下面错误:

(p2) PS C:\Users\Administrator\Desktop\LightGBM-master\docs> make html
Running Sphinx v5.2.3
[autosummary] generating autosummary for: Python-API.rst
Extension error:
Handler <function generate_doxygen_xml at 0x000001518D4B3C10> for event 'builder-inited' threw an exception (exception: An error has occurred while executing Doxygen
[WinError 2] 系统找不到指定的文件。)
(p2) PS C:\Users\Administrator\Desktop\LightGBM-master\docs>

百思不得其解,感觉是少了Doxygen包,搜索需要下载安装


2.doxygen下载


下载地址www.doxygen.nl/files/doxyg…

二话不说安装即可。

(p2) PS C:\Users\Administrator\Desktop\LightGBM-master\docs> make html
Running Sphinx v5.2.3
[autosummary] generating autosummary for: Python-API.rst
Extension error:
Handler <function generate_doxygen_xml at 0x000001F02BBF2C10> for event 'builder-inited' threw an exception (exception: An error has occurred while executing Doxygen
[WinError 2] 系统找不到指定的文件。)

依然报错。。。。。。

思考再三,应该是环境变量问题。


3.配置环境变量


在path中加入C:\Program Files\doxygen\bin后,再次运行

(p2) PS C:\Users\Administrator\Desktop\LightGBM-master\docs> make html
Running Sphinx v5.2.3
[autosummary] generating autosummary for: Python-API.rst
Doxygen version used: 1.9.5 (2f6875a5ca481a69a6f32650c77a667f87d25e88)
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Reading and parsing tag files
Parsing files
Preprocessing C:/Users/Administrator/Desktop/LightGBM-master/include/LightGBM/c_api.h...
Parsing file C:/Users/Administrator/Desktop/LightGBM-master/include/LightGBM/c_api.h...
Building macro definition list...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Building concept list...
Computing nesting relations for classes...
Associating documentation with classes...
Associating documentation with concepts...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Creating members for template instances...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Setting anonymous enum type...
Computing dependencies between directories...
Generating citations page...
Counting members...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Correcting members for VHDL...
Computing tooltip texts...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Generating code for file C:/Users/Administrator/Desktop/LightGBM-master/include/LightGBM/c_api.h...
Generating file documentation...
Generating docs for file C:/Users/Administrator/Desktop/LightGBM-master/include/LightGBM/c_api.h...
Generating page documentation...
Generating group documentation...
Generating class documentation...
Generating concept documentation...
Generating namespace index...
Generating graph info page...
Generating directory documentation...
finalizing index lists...
writing tag file...
Generating XML output...
Generating XML output for file c_api.h
Generate XML output for dir C:/Users/Administrator/Desktop/LightGBM-master/include/
Generate XML output for dir C:/Users/Administrator/Desktop/LightGBM-master/include/LightGBM/
Running plantuml with JAVA...
type lookup cache used 92/65536 hits=634 misses=92
symbol lookup cache used 178/65536 hits=102 misses=178
finished...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 43 source files that are out of date
updating environment: [new config] 43 added, 0 changed, 0 removed
reading sources... [100%] pythonapi/lightgbm.train
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] pythonapi/lightgbm.train
generating indices... genindex done
highlighting module code... [100%] lightgbm.sklearn
writing additional pages... search done
copying images... [100%] logo/LightGBM_logo_black_text.svg
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
The HTML pages are in _build\html.

编译成功!!!


目录
相关文章
|
6月前
|
Python
在 Python 中,如何处理文件和目录?
在 Python 中,如何处理文件和目录?
117 0
|
5月前
|
Python Windows
一步步教你将包含其他文件的 Python 脚本等打包成 EXE
最近我编写了一个Python脚本,该脚本需要依赖两个同级目录下的文件才能正常运行。然而,当我将脚本打包成EXE程序后,必须将这两个文件放在EXE文件的同级目录下才能正常执行。为了简化部署,我希望能将这两个文件一起打包到EXE文件中,这时候该怎么办呢?
|
6月前
|
Python
Python小工具-复制嵌套目录下的多个word文档到指定目录
Python小工具-复制嵌套目录下的多个word文档到指定目录
|
XML 运维 数据可视化
使用cmake 构建构建新项目的时候,编译提示库找不到怎么办?
以上是一些常见的解决方案,但具体解决方案可能因具体情况而异。如果以上解决方案无法解决问题,请提供更多详细信息,留在评论区,以便博主更好地帮助您解决问题。
249 0
下载文档【报错的小技巧】(了解一下)
下载文档【报错的小技巧】(了解一下)
48 0
|
Linux Shell iOS开发
【100天精通python】Day16:python模块_模块的搜索目录和导入模块异常时的处理方法
【100天精通python】Day16:python模块_模块的搜索目录和导入模块异常时的处理方法
119 0
|
Windows Python
Python 获取“我的文档”等win系统路径的几种方法
Python 获取“我的文档”等win系统路径的几种方法
508 0
|
编解码 Python
Geany导入带有中文字符的.py文件然后执行报错解决办法
Geany导入带有中文字符的.py文件然后执行报错解决办法
204 0
Geany导入带有中文字符的.py文件然后执行报错解决办法
|
Python
【Python实例5.28】jieba库安装出错的解决方法~总结笔记
【Python实例5.28】jieba库安装出错的解决方法~总结笔记
2816 1
【Python实例5.28】jieba库安装出错的解决方法~总结笔记