Git Product home page Git Product logo

Comments (7)

dylanh724 avatar dylanh724 commented on June 11, 2024 1

Hey @dylanh724, sphinx uses the standard Python declaration for scripts:

sphinx/pyproject.toml

Lines 106 to 107 in c41aab8

[project.scripts]
sphinx-build = "sphinx.cmd.build:main"

So if there is a problem it would likely lie with flit or pip (I've never encountered this problem, but then I don't use windows and also no idea what chocolatey is)

Alternatively, you can more specifically target the correct Python executable using: python -m sphinx.cmd.build, let me know if that works

Got it --

 WARNING: The scripts sphinx-apidoc.exe, sphinx-autogen.exe, sphinx-build.exe and sphinx-quickstart.exe are installed in 'C:\Users\dylan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH

It turns out that the Microsoft Store variant of Python does not include /Scripts to path (strange since they add python/pip to path).

Since they have a really wild path/to (you can't even view the dir in Windows - it's encrypted from yourself with access denied if you attempt to browse), this warning is the only chance to find where the correct path/to/Scripts/ actually is.

Windows...

This is the most official way to get Python these days, so you'll probably start seeing more tickets like this @chrisjsewell - thanks for the speedy response.

from sphinx.

chrisjsewell avatar chrisjsewell commented on June 11, 2024 1

@zooba that's exactly what I already said 😅 #12342 (comment)

from sphinx.

chrisjsewell avatar chrisjsewell commented on June 11, 2024

Hey @dylanh724, sphinx uses the standard Python declaration for scripts:

sphinx/pyproject.toml

Lines 106 to 107 in c41aab8

[project.scripts]
sphinx-build = "sphinx.cmd.build:main"

So if there is a problem it would likely lie with flit or pip
(I've never encountered this problem, but then I don't use windows and also no idea what chocolatey is)

Alternatively, you can more specifically target the correct Python executable using: python -m sphinx.cmd.build,
let me know if that works

from sphinx.

dylanh724 avatar dylanh724 commented on June 11, 2024

TL;DR

Windows users that installed from Microsoft Store should add the following path to their user env var:

C:\Users\{user}\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts

⚠️Replacing {user}

from sphinx.

dylanh724 avatar dylanh724 commented on June 11, 2024

^ @chrisjsewell Hmm... you know, it may be worth including this in the Windows install doc if they get a command not found err. If this isn't a common issue yet, it will be.

from sphinx.

zooba avatar zooba commented on June 11, 2024

Rather than telling users to modify PATH, I'd recommend you make sure that python -m sphinx build (or some similar spelling) works, and let people use that. It is significantly more robust for global installs than using the generated script executables (though those tend to be just fine in a virtual environment).

from sphinx.

dylanh724 avatar dylanh724 commented on June 11, 2024

Perhaps this should be in the install docs?

pip install -U sphinx

After installation, type sphinx-build --version on the command prompt. 

Eg, add the prefix here.

from sphinx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.