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.
编译成功!!!