From d436e2a336850dea1c74c689cc382f1ae54e886b Mon Sep 17 00:00:00 2001 From: YMnRb <143248632+YMnRb@users.noreply.github.com> Date: Sun, 18 Jan 2026 10:41:46 +0800 Subject: [PATCH] gh-143963: Update "Using Python on Windows" document Add more solutions for troubleshooting. --- Doc/using/windows.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index a4bc336cc92618..4131f401f5db56 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -812,6 +812,11 @@ default). The operating system includes this entry once by default, after other user paths. If removed, shortcuts will not be found. + * - + - If you are sure your :envvar:`PATH` variable works right, reopen the + terminal you're using. Perhaps :envvar:`PATH` was modified when the terminal + was still running, and the terminal has not got it updated. + * - ``py`` gives me a "command not found" error when I type it in my terminal. - Did you :ref:`install the Python install manager `? @@ -828,6 +833,11 @@ default). The operating system includes this entry once by default, after other user paths. If removed, shortcuts will not be found. + * - + - If you are sure your :envvar:`PATH` variable works right, reopen the + terminal you're using. Perhaps :envvar:`PATH` was modified when the terminal + was still running, and the terminal has not got it updated. + * - ``py`` gives me a "can't open file" error when I type commands in my terminal. - This usually means you have the legacy launcher installed and @@ -877,6 +887,11 @@ default). These scripts are separated for each runtime, and so you may need to add multiple paths. + * - + - If you are sure your :envvar:`PATH` variable works right, reopen the + terminal you're using. Perhaps :envvar:`PATH` was modified when the terminal + was still running, and the terminal has not got it updated. + * - Typing ``script-name.py`` in the terminal opens in a new window. - This is a known limitation of the operating system. Either specify ``py`` before the script name, create a batch file containing ``@py "%~dpn0.py" %*``