使HTML在Windows 10中不适用于Sphinx文档 [英] Make HTML not working for Sphinx documentation in windows 10

查看:160
本文介绍了使HTML在Windows 10中不适用于Sphinx文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试遵循教程关于如何将sphinx和Readthedocs一起设置为项目.在实习期间,我曾经在Spuntx上使用ubuntu,设置非常无缝.我刚刚在anaconda电源外壳上启动了 sphinx-quickstart .当我尝试运行 make html 时,出现以下错误:

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.

首先,我认为这是因为我从未安装过MinGW.但是即使这样做了,我似乎也无法解决问题,也不知道如何开始研究它.我的python安装完全基于Anaconda.

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.

推荐答案

展开上面的评论.

Expand the comment above.

由sphinx生成的默认站点假定您在多个操作系统上使用 make html 来生成HTML页面.

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,

  • 您在装有(GNU)make的macOS或Linux上,因此 make html 执行 Makefile 中定义的任务.
  • 您在Windows上,并且在命令提示符( cmd.exe )上,因此 make html 实际上是对 make.bat 的调用.
  • li>
  • 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.

但是,您正在启动PowerShell控制台("PS D:"表示),因此您无法使 make html 正常工作.PowerShell不知道如何处理 make ,并且不会自动调用 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.

这篇关于使HTML在Windows 10中不适用于Sphinx文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆