Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When following contributing docs on Windows "nox: The term 'nox' is not recognized" #24814

Closed
Tyriar opened this issue Feb 13, 2025 · 3 comments
Assignees

Comments

@Tyriar
Copy link
Member

Tyriar commented Feb 13, 2025

Following https://github.com/microsoft/vscode-python/wiki/Coding#building I hit this:

Image

I assumed that meant it's not on the PATH but was registered correctly as what normally happens on Windows, so I closed VS Code, opened it again (most people may know to try this) and created a new terminal (most people wouldn't know to do this step). But that didn't end up fixing it:

Image

From there I had a screenshot of the warning above because I was reporting this issue, so I added it to the Windows environment by typing out the path manually:

Image

After that nox was available.

I did then run into this error but I know that's about me ignoring Rust as a pre-requisite earlier.

Image

We should explain that where nox is installed into may not be in the path. Also wasn't it meant to be installed into venv since it was activated?

@Tyriar Tyriar added the feature-request Request for new features or functionality label Feb 13, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 13, 2025
@Tyriar Tyriar removed feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team labels Feb 13, 2025
@karthiknadig
Copy link
Member

@Tyriar It looks like nox got installed in the wrong place. This is the typical Windows vs Unix issue with python virtual envs. python3 is valid in a activated venv only on Linux/Mac. Unless it was created using different environment manager tools like uv or virtualenv.

I have updated the docs to use the exact paths:

Windows:

Image

Linux:

Image

@Tyriar
Copy link
Member Author

Tyriar commented Feb 13, 2025

Thanks, I think that fixes the problem if .venv/bin/python is used directly. One thing though that you mention .venv/Scripts above when activating but not on the nox line. It's probably worth just splitting the latter part out into pwsh (windows) and sh (linux/mac) sections to simplify things.

@karthiknadig
Copy link
Member

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants