Make HTML not working for Sphinx documentation in windows 10

别说谁变了你拦得住时间么 提交于 2021-01-20 12:53:42

问题


I'm trying to follow the tutorial about how to set sphinx and Readthedocs together for project. I used Sphinx back in the day while in a internship, with ubuntu and the setup was quite seamless. I've just launched the sphinx-quickstart on my anaconda power shell. When I try to run make html the following error appears:

(base) PS D:\code\RaspberryServer\docs> make html
make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ make html
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (make:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command make was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\make". See "get-help about_Command_Precedence" for more details.

Firstly I thought it was because I had never installed MinGW. But even after doing so I don't seem to fix the problem and I have no clue to how to start looking into it. My python installation is fully based on Anaconda.


回答1:


Expand the comment above.

The default site generated by sphinx assumes you use make html on multiple operating systems to generate HTML pages.

That's achieved by typical assumption that,

  • You are on macOS or Linux with (GNU) make installed, so make html executes the task defined in Makefile.
  • You are on Windows and at command prompt (cmd.exe), so make html actually calls to make.bat.

However, you are launching PowerShell console ("PS D:" indicates that), so you cannot get make html working properly. PowerShell does not know what to do with make, and won't call make.bat automatically.



来源:https://stackoverflow.com/questions/65471557/make-html-not-working-for-sphinx-documentation-in-windows-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!