使HTML不适用于windows 10中的Sphinx文档

使HTML不适用于windows 10中的Sphinx文档,windows,makefile,anaconda,python-sphinx,Windows,Makefile,Anaconda,Python Sphinx,我正试着遵循关于如何为项目设置sphinx和Readthedocs的规则。我在实习期间使用了Sphinx,ubuntu的安装非常无缝。我刚刚在我的anaconda power shell上启动了sphinx quickstart。当我尝试运行生成html时,出现以下错误: (base) PS D:\code\RaspberryServer\docs> make html make : The term 'make' is not recognized as the name of a cm

我正试着遵循关于如何为项目设置sphinx和Readthedocs的规则。我在实习期间使用了Sphinx,ubuntu的安装非常无缝。我刚刚在我的anaconda power shell上启动了
sphinx quickstart
。当我尝试运行
生成html
时,出现以下错误:

(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.
首先我认为这是因为我从未安装过MinGW。但即使这样做了,我似乎也没有解决这个问题,我也不知道该如何开始研究它。我的python安装完全基于Anaconda

展开上面的评论

sphinx生成的默认站点假定您在多个操作系统上使用
生成html
,以生成html页面

这是通过典型的假设实现的

  • 您在macOS或Linux上安装了(GNU)make,因此
    make html
    执行
    Makefile
    中定义的任务
  • 您在Windows上,在命令提示符下(
    cmd.exe
    ),因此
    make html
    实际上调用了
    make.bat

但是,您正在启动PowerShell控制台(“PS D:”表示),因此无法使html正常工作。PowerShell不知道如何处理
make
,也不会自动调用
make.bat

该指南假设您使用cmd.exe,但您在PowerShell控制台中。尝试运行
\make.bat html
谢谢,这解决了我的问题。你能给我解释一下使用这些的区别吗?据我所知,powershell通常采用更灵活的方法(更接近UNIX)