mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-133928: Improvements to using/windows.rst (GH-133952)
(cherry picked from commit fc3cddd90a
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
5632e93f46
commit
24847d04b2
1 changed files with 12 additions and 9 deletions
|
@ -77,15 +77,10 @@ To install the file downloaded from python.org, either double-click and select
|
||||||
"Install", or run ``Add-AppxPackage <path to MSIX>`` in Windows Powershell.
|
"Install", or run ``Add-AppxPackage <path to MSIX>`` in Windows Powershell.
|
||||||
|
|
||||||
After installation, the ``python``, ``py``, and ``pymanager`` commands should be
|
After installation, the ``python``, ``py``, and ``pymanager`` commands should be
|
||||||
available. If they are not, click Start and search for "Manage app execution
|
available. If you have existing installations of Python, or you have modified
|
||||||
aliases". This settings page will let you enable the relevant commands. They
|
your :envvar:`PATH` variable, you may need to remove them or undo the
|
||||||
will be labelled "Python (default)", "Python (default windowed)", and "Python
|
modifications. See :ref:`pymanager-troubleshoot` for more help with fixing
|
||||||
install manager".
|
non-working commands.
|
||||||
|
|
||||||
If you have existing installations of Python, or you have modified your
|
|
||||||
:envvar:`PATH` variable, you may need to remove them or undo the modifications
|
|
||||||
in order for the commands to work. Old versions of Python can be reinstalled
|
|
||||||
using the Python install manager.
|
|
||||||
|
|
||||||
When you first install a runtime, you will likely be prompted to add a directory
|
When you first install a runtime, you will likely be prompted to add a directory
|
||||||
to your :envvar:`PATH`. This is optional, if you prefer to use the ``py``
|
to your :envvar:`PATH`. This is optional, if you prefer to use the ``py``
|
||||||
|
@ -150,6 +145,10 @@ want to be passed to the runtime (such as script files or the module to launch):
|
||||||
$> py -m this
|
$> py -m this
|
||||||
...
|
...
|
||||||
|
|
||||||
|
The default runtime can be overridden with the :envvar:`PYTHON_MANAGER_DEFAULT`
|
||||||
|
environment variable, or a configuration file. See :ref:`pymanager-config` for
|
||||||
|
information about configuration settings.
|
||||||
|
|
||||||
To launch a specific runtime, the ``py`` command accepts a ``-V:<TAG>`` option.
|
To launch a specific runtime, the ``py`` command accepts a ``-V:<TAG>`` option.
|
||||||
This option must be specified before any others. The tag is part or all of the
|
This option must be specified before any others. The tag is part or all of the
|
||||||
identifier for the runtime; for those from the CPython team, it looks like the
|
identifier for the runtime; for those from the CPython team, it looks like the
|
||||||
|
@ -472,6 +471,10 @@ directory (which you may have added to your :envvar:`PATH` environment variable)
|
||||||
can be used in a shebang, even if it is not on your :envvar:`PATH`. This allows
|
can be used in a shebang, even if it is not on your :envvar:`PATH`. This allows
|
||||||
the use of shebangs like ``/usr/bin/python3.12`` to select a particular runtime.
|
the use of shebangs like ``/usr/bin/python3.12`` to select a particular runtime.
|
||||||
|
|
||||||
|
If no runtimes are installed, or if automatic installation is enabled, the
|
||||||
|
requested runtime will be installed if necessary. See :ref:`pymanager-config`
|
||||||
|
for information about configuration settings.
|
||||||
|
|
||||||
The ``/usr/bin/env`` form of shebang line will also search the :envvar:`PATH`
|
The ``/usr/bin/env`` form of shebang line will also search the :envvar:`PATH`
|
||||||
environment variable for unrecognized commands. This corresponds to the
|
environment variable for unrecognized commands. This corresponds to the
|
||||||
behaviour of the Unix ``env`` program, which performs the same search, but
|
behaviour of the Unix ``env`` program, which performs the same search, but
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue