aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Doc/using
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/android.rst9
-rw-r--r--Doc/using/cmdline.rst21
-rw-r--r--Doc/using/configure.rst12
-rw-r--r--Doc/using/ios.rst11
-rw-r--r--Doc/using/mac.rst113
-rw-r--r--Doc/using/windows.rst117
6 files changed, 195 insertions, 88 deletions
diff --git a/Doc/using/android.rst b/Doc/using/android.rst
index 65bf23dc994..cb762310328 100644
--- a/Doc/using/android.rst
+++ b/Doc/using/android.rst
@@ -63,3 +63,12 @@ link to the relevant file.
* Add code to your app to :source:`start Python in embedded mode
<Android/testbed/app/src/main/c/main_activity.c>`. This will need to be C code
called via JNI.
+
+Building a Python package for Android
+-------------------------------------
+
+Python packages can be built for Android as wheels and released on PyPI. The
+recommended tool for doing this is `cibuildwheel
+<https://cibuildwheel.pypa.io/en/stable/platforms/#android>`__, which automates
+all the details of setting up a cross-compilation environment, building the
+wheel, and testing it on an emulator.
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index 40a46a62031..cad49e2deeb 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -653,7 +653,7 @@ Miscellaneous options
.. versionadded:: 3.13
* :samp:`-X thread_inherit_context={0,1}` causes :class:`~threading.Thread`
- to, by default, use a copy of context of of the caller of
+ to, by default, use a copy of context of the caller of
``Thread.start()`` when starting. Otherwise, threads will start
with an empty context. If unset, the value of this option defaults
to ``1`` on free-threaded builds and to ``0`` otherwise. See also
@@ -669,6 +669,13 @@ Miscellaneous options
.. versionadded:: 3.14
+ * :samp:`-X tlbc={0,1}` enables (1, the default) or disables (0) thread-local
+ bytecode in builds configured with :option:`--disable-gil`. When disabled,
+ this also disables the specializing interpreter. See also
+ :envvar:`PYTHON_TLBC`.
+
+ .. versionadded:: 3.14
+
It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
@@ -1277,7 +1284,7 @@ conflict.
.. envvar:: PYTHON_THREAD_INHERIT_CONTEXT
If this variable is set to ``1`` then :class:`~threading.Thread` will,
- by default, use a copy of context of of the caller of ``Thread.start()``
+ by default, use a copy of context of the caller of ``Thread.start()``
when starting. Otherwise, new threads will start with an empty context.
If unset, this variable defaults to ``1`` on free-threaded builds and to
``0`` otherwise. See also :option:`-X thread_inherit_context<-X>`.
@@ -1302,6 +1309,16 @@ conflict.
.. versionadded:: 3.13
+.. envvar:: PYTHON_TLBC
+
+ If set to ``1`` enables thread-local bytecode. If set to ``0`` thread-local
+ bytecode and the specializing interpreter are disabled. Only applies to
+ builds configured with :option:`--disable-gil`.
+
+ See also the :option:`-X tlbc <-X>` command-line option.
+
+ .. versionadded:: 3.14
+
Debug-mode variables
~~~~~~~~~~~~~~~~~~~~
diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst
index b914d3397b6..df81a330549 100644
--- a/Doc/using/configure.rst
+++ b/Doc/using/configure.rst
@@ -290,8 +290,8 @@ General Options
.. option:: --disable-gil
- Enables **experimental** support for running Python without the
- :term:`global interpreter lock` (GIL): free threading build.
+ Enables support for running Python without the :term:`global interpreter
+ lock` (GIL): free threading build.
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
:data:`sys.abiflags`.
@@ -445,6 +445,14 @@ Options for third-party dependencies
C compiler and linker flags for ``libuuid``, used by :mod:`uuid` module,
overriding ``pkg-config``.
+.. option:: LIBZSTD_CFLAGS
+.. option:: LIBZSTD_LIBS
+
+ C compiler and linker flags for ``libzstd``, used by :mod:`compression.zstd` module,
+ overriding ``pkg-config``.
+
+ .. versionadded:: 3.14
+
.. option:: PANEL_CFLAGS
.. option:: PANEL_LIBS
diff --git a/Doc/using/ios.rst b/Doc/using/ios.rst
index 7d5c6331bef..0fb28f8c866 100644
--- a/Doc/using/ios.rst
+++ b/Doc/using/ios.rst
@@ -298,9 +298,9 @@ To add Python to an iOS Xcode project:
* Signal handlers (:c:member:`PyConfig.install_signal_handlers`) are *enabled*;
* System logging (:c:member:`PyConfig.use_system_logger`) is *enabled*
(optional, but strongly recommended; this is enabled by default);
- * ``PYTHONHOME`` for the interpreter is configured to point at the
+ * :envvar:`PYTHONHOME` for the interpreter is configured to point at the
``python`` subfolder of your app's bundle; and
- * The ``PYTHONPATH`` for the interpreter includes:
+ * The :envvar:`PYTHONPATH` for the interpreter includes:
- the ``python/lib/python3.X`` subfolder of your app's bundle,
- the ``python/lib/python3.X/lib-dynload`` subfolder of your app's bundle, and
@@ -324,7 +324,12 @@ modules in your app, some additional steps will be required:
the ``lib-dynload`` folder can be copied and adapted for this purpose.
* If you're using a separate folder for third-party packages, ensure that folder
- is included as part of the ``PYTHONPATH`` configuration in step 10.
+ is included as part of the :envvar:`PYTHONPATH` configuration in step 10.
+
+* If any of the folders that contain third-party packages will contain ``.pth``
+ files, you should add that folder as a *site directory* (using
+ :meth:`site.addsitedir`), rather than adding to :envvar:`PYTHONPATH` or
+ :attr:`sys.path` directly.
Testing a Python package
------------------------
diff --git a/Doc/using/mac.rst b/Doc/using/mac.rst
index 4b6c884f3d4..f88f3c2e078 100644
--- a/Doc/using/mac.rst
+++ b/Doc/using/mac.rst
@@ -20,13 +20,6 @@ the Pythons provided by the CPython release team for download from
the `python.org website <https://www.python.org/downloads/>`_. See
:ref:`alternative_bundles` for some other options.
-.. |usemac_x_dot_y| replace:: 3.13
-.. |usemac_python_x_dot_y_literal| replace:: ``python3.13``
-.. |usemac_python_x_dot_y_t_literal| replace:: ``python3.13t``
-.. |usemac_python_x_dot_y_t_literal_config| replace:: ``python3.13t-config``
-.. |usemac_applications_folder_name| replace:: ``Python 3.13``
-.. |usemac_applications_folder_version| replace:: ``/Applications/Python 3.13/``
-
.. _getting-osx:
.. _getting-and-installing-macpython:
@@ -64,7 +57,7 @@ Clicking on the **Continue** button brings up the **Read Me** for this installer
Besides other important information, the **Read Me** documents which Python version is
going to be installed and on what versions of macOS it is supported. You may need
to scroll through to read the whole file. By default, this **Read Me** will also be
-installed in |usemac_applications_folder_version| and available to read anytime.
+installed in |applications_python_version_literal| and available to read anytime.
.. image:: mac_installer_02_readme.png
@@ -83,7 +76,7 @@ display. For most uses, the standard set of installation operations is appropria
By pressing the **Customize** button, you can choose to omit or select certain package
components of the installer. Click on each package name to see a description of
what it installs.
-To also install support for the optional experimental free-threaded feature,
+To also install support for the optional free-threaded feature,
see :ref:`install-freethreaded-macos`.
.. image:: mac_installer_05_custom_install.png
@@ -97,7 +90,7 @@ When the installation is complete, the **Summary** window will appear.
.. image:: mac_installer_06_summary.png
Double-click on the :command:`Install Certificates.command`
-icon or file in the |usemac_applications_folder_version| window to complete the
+icon or file in the |applications_python_version_literal| window to complete the
installation.
.. image:: mac_installer_07_applications.png
@@ -114,7 +107,7 @@ Close this terminal window and the installer window.
A default install will include:
-* A |usemac_applications_folder_name| folder in your :file:`Applications` folder. In here
+* A |python_version_literal| folder in your :file:`Applications` folder. In here
you find :program:`IDLE`, the development environment that is a standard part of official
Python distributions; and :program:`Python Launcher`, which handles double-clicking Python
scripts from the macOS `Finder <https://support.apple.com/en-us/HT201732>`_.
@@ -141,7 +134,7 @@ How to run a Python script
There are two ways to invoke the Python interpreter.
If you are familiar with using a Unix shell in a terminal
-window, you can invoke |usemac_python_x_dot_y_literal| or ``python3`` optionally
+window, you can invoke |python_x_dot_y_literal| or ``python3`` optionally
followed by one or more command line options (described in :ref:`using-on-general`).
The Python tutorial also has a useful section on
:ref:`using Python interactively from a shell <tut-interac>`.
@@ -160,7 +153,7 @@ for more information.
To run a Python script file from the terminal window, you can
invoke the interpreter with the name of the script file:
- |usemac_python_x_dot_y_literal| ``myscript.py``
+ |python_x_dot_y_literal| ``myscript.py``
To run your script from the Finder, you can either:
@@ -259,20 +252,20 @@ Advanced Topics
Installing Free-threaded Binaries
---------------------------------
-.. versionadded:: 3.13 (Experimental)
-
-.. note::
-
- Everything described in this section is considered experimental,
- and should be expected to change in future releases.
+.. versionadded:: 3.13
The ``python.org`` :ref:`Python for macOS <getting-and-installing-macpython>`
installer package can optionally install an additional build of
-Python |usemac_x_dot_y| that supports :pep:`703`, the experimental free-threading feature
+Python |version| that supports :pep:`703`, the free-threading feature
(running with the :term:`global interpreter lock` disabled).
Check the release page on ``python.org`` for possible updated information.
-Because this feature is still considered experimental, the support for it
+The free-threaded mode is working and continues to be improved, but
+there is some additional overhead in single-threaded workloads compared
+to the regular build. Additionally, third-party packages, in particular ones
+with an :term:`extension module`, may not be ready for use in a
+free-threaded build, and will re-enable the :term:`GIL`.
+Therefore, the support for free-threading
is not installed by default. It is packaged as a separate install option,
available by clicking the **Customize** button on the **Installation Type**
step of the installer as described above.
@@ -282,46 +275,54 @@ step of the installer as described above.
If the box next to the **Free-threaded Python** package name is checked,
a separate :file:`PythonT.framework` will also be installed
alongside the normal :file:`Python.framework` in :file:`/Library/Frameworks`.
-This configuration allows a free-threaded Python |usemac_x_dot_y| build to co-exist
-on your system with a traditional (GIL only) Python |usemac_x_dot_y| build with
-minimal risk while installing or testing. This installation layout is itself
-experimental and is subject to change in future releases.
+This configuration allows a free-threaded Python |version| build to co-exist
+on your system with a traditional (GIL only) Python |version| build with
+minimal risk while installing or testing. This installation layout may
+change in future releases.
Known cautions and limitations:
- The **UNIX command-line tools** package, which is selected by default,
- will install links in :file:`/usr/local/bin` for |usemac_python_x_dot_y_t_literal|,
- the free-threaded interpreter, and |usemac_python_x_dot_y_t_literal_config|,
+ will install links in :file:`/usr/local/bin` for |python_x_dot_y_t_literal|,
+ the free-threaded interpreter, and |python_x_dot_y_t_literal_config|,
a configuration utility which may be useful for package builders.
Since :file:`/usr/local/bin` is typically included in your shell ``PATH``,
in most cases no changes to your ``PATH`` environment variables should
- be needed to use |usemac_python_x_dot_y_t_literal|.
+ be needed to use |python_x_dot_y_t_literal|.
- For this release, the **Shell profile updater** package and the
- :file:`Update Shell Profile.command` in |usemac_applications_folder_version|
+ :file:`Update Shell Profile.command` in |applications_python_version_literal|
do not support the free-threaded package.
- The free-threaded build and the traditional build have separate search
paths and separate :file:`site-packages` directories so, by default,
if you need a package available in both builds, it may need to be installed in both.
The free-threaded package will install a separate instance of :program:`pip` for use
- with |usemac_python_x_dot_y_t_literal|.
+ with |python_x_dot_y_t_literal|.
- To install a package using :command:`pip` without a :command:`venv`:
- |usemac_python_x_dot_y_t_literal| ``-m pip install <package_name>``
+ .. parsed-literal::
+
+ python\ |version|\ t -m pip install <package_name>
- When working with multiple Python environments, it is usually safest and easiest
to :ref:`create and use virtual environments <tut-venv>`.
This can avoid possible command name conflicts and confusion about which Python is in use:
- |usemac_python_x_dot_y_t_literal| ``-m venv <venv_name>``
+ .. parsed-literal::
+
+ python\ |version|\ t -m venv <venv_name>
+
then :command:`activate`.
- To run a free-threaded version of IDLE:
- |usemac_python_x_dot_y_t_literal| ``-m idlelib``
+ .. parsed-literal::
+
+ python\ |version|\ t -m idlelib
+
- The interpreters in both builds respond to the same
:ref:`PYTHON environment variables <using-on-envvars>`
@@ -337,28 +338,28 @@ Known cautions and limitations:
thus it only needs to be run once.
- If you cannot depend on the link in ``/usr/local/bin`` pointing to the
- ``python.org`` free-threaded |usemac_python_x_dot_y_t_literal| (for example, if you want
+ ``python.org`` free-threaded |python_x_dot_y_t_literal| (for example, if you want
to install your own version there or some other distribution does),
you can explicitly set your shell ``PATH`` environment variable to
include the ``PythonT`` framework ``bin`` directory:
- .. code-block:: sh
+ .. parsed-literal::
- export PATH="/Library/Frameworks/PythonT.framework/Versions/3.13/bin":"$PATH"
+ export PATH="/Library/Frameworks/PythonT.framework/Versions/\ |version|\ /bin":"$PATH"
The traditional framework installation by default does something similar,
except for :file:`Python.framework`. Be aware that having both framework ``bin``
directories in ``PATH`` can lead to confusion if there are duplicate names
- like ``python3.13`` in both; which one is actually used depends on the order
+ like |python_x_dot_y_literal| in both; which one is actually used depends on the order
they appear in ``PATH``. The ``which python3.x`` or ``which python3.xt``
commands can show which path is being used. Using virtual environments
can help avoid such ambiguities. Another option might be to create
a shell :command:`alias` to the desired interpreter, like:
- .. code-block:: sh
+ .. parsed-literal::
- alias py3.13="/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13"
- alias py3.13t="/Library/Frameworks/PythonT.framework/Versions/3.13/bin/python3.13t"
+ alias py\ |version|\ ="/Library/Frameworks/Python.framework/Versions/\ |version|\ /bin/python\ |version|\ "
+ alias py\ |version|\ t="/Library/Frameworks/PythonT.framework/Versions/\ |version|\ /bin/python\ |version|\ t"
Installing using the command line
---------------------------------
@@ -369,22 +370,22 @@ the macOS command line :command:`installer` utility lets you select non-default
options, too. If you are not familiar with :command:`installer`, it can be
somewhat cryptic (see :command:`man installer` for more information).
As an example, the following shell snippet shows one way to do it,
-using the ``3.13.0b2`` release and selecting the free-threaded interpreter
+using the |x_dot_y_b2_literal| release and selecting the free-threaded interpreter
option:
-.. code-block:: sh
+.. parsed-literal::
- RELEASE="python-3.13.0b2-macos11.pkg"
+ RELEASE="python-\ |version|\ 0b2-macos11.pkg"
# download installer pkg
- curl -O https://www.python.org/ftp/python/3.13.0/${RELEASE}
+ curl -O \https://www.python.org/ftp/python/\ |version|\ .0/${RELEASE}
# create installer choicechanges to customize the install:
- # enable the PythonTFramework-3.13 package
+ # enable the PythonTFramework-\ |version|\ package
# while accepting the other defaults (install all other packages)
cat > ./choicechanges.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "\http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
@@ -393,7 +394,7 @@ option:
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
- <string>org.python.Python.PythonTFramework-3.13</string>
+ <string>org.python.Python.PythonTFramework-\ |version|\ </string>
</dict>
</array>
</plist>
@@ -404,19 +405,19 @@ option:
You can then test that both installer builds are now available with something like:
-.. code-block:: console
+.. parsed-literal::
$ # test that the free-threaded interpreter was installed if the Unix Command Tools package was enabled
- $ /usr/local/bin/python3.13t -VV
- Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
+ $ /usr/local/bin/python\ |version|\ t -VV
+ Python \ |version|\ .0b2 free-threading build (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
$ # and the traditional interpreter
- $ /usr/local/bin/python3.13 -VV
- Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
+ $ /usr/local/bin/python\ |version|\ -VV
+ Python \ |version|\ .0b2 (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
$ # test that they are also available without the prefix if /usr/local/bin is on $PATH
- $ python3.13t -VV
- Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
- $ python3.13 -VV
- Python 3.13.0b2 (v3.13.0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
+ $ python\ |version|\ t -VV
+ Python \ |version|\ .0b2 free-threading build (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:57:31) [Clang 15.0.0 (clang-1500.3.9.4)]
+ $ python\ |version|\ -VV
+ Python \ |version|\ .0b2 (v\ |version|\ .0b2:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)]
.. note::
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
index 74d6db5d7d1..9628da3d2f6 100644
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -77,31 +77,30 @@ To install the file downloaded from python.org, either double-click and select
"Install", or run ``Add-AppxPackage <path to MSIX>`` in Windows Powershell.
After installation, the ``python``, ``py``, and ``pymanager`` commands should be
-available. If they are not, click Start and search for "Manage app execution
-aliases". This settings page will let you enable the relevant commands. They
-will be labelled "Python (default)", "Python (default windowed)", and "Python
-install manager".
-
-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.
+available. 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. See :ref:`pymanager-troubleshoot` for more help with fixing
+non-working commands.
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``
command, but is offered for those who prefer the full range of aliases (such
as ``python3.14.exe``) to be available. The directory will be
-:file:`%LocalAppData%\Python\bin` by default, but may be customized by an
+:file:`%LocalAppData%\\Python\\bin` by default, but may be customized by an
administrator. Click Start and search for "Edit environment variables for your
account" for the system settings page to add the path.
+Each Python runtime you install will have its own directory for scripts. These
+also need to be added to :envvar:`PATH` if you want to use them.
+
The Python install manager will be automatically updated to new releases. This
does not affect any installs of Python runtimes. Uninstalling the Python install
manager does not uninstall any Python runtimes.
If you are not able to install an MSIX in your context, for example, you are
-using automated deployment software that does not support it, please see
-:ref:`pymanager-advancedinstall` below for more information.
+using automated deployment software that does not support it, or are targeting
+Windows Server 2019, please see :ref:`pymanager-advancedinstall` below for more
+information.
Basic Use
@@ -147,6 +146,10 @@ want to be passed to the runtime (such as script files or the module to launch):
$> 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.
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
@@ -469,6 +472,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
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`
environment variable for unrecognized commands. This corresponds to the
behaviour of the Unix ``env`` program, which performs the same search, but
@@ -497,6 +504,14 @@ configuration option.
installing and uninstalling.
+.. _Add-AppxPackage: https://learn.microsoft.com/powershell/module/appx/add-appxpackage
+
+.. _Remove-AppxPackage: https://learn.microsoft.com/powershell/module/appx/remove-appxpackage
+
+.. _Add-AppxProvisionedPackage: https://learn.microsoft.com/powershell/module/dism/add-appxprovisionedpackage
+
+.. _PackageManager: https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager
+
.. _pymanager-advancedinstall:
Advanced Installation
@@ -509,6 +524,11 @@ per-machine installs to its default location in Program Files. It will attempt
to modify the system :envvar:`PATH` environment variable to include this install
location, but be sure to validate this on your configuration.
+.. note::
+
+ Windows Server 2019 is the only version of Windows that CPython supports that
+ does not support MSIX. For Windows Server 2019, you should use the MSI.
+
Be aware that the MSI package does not bundle any runtimes, and so is not
suitable for installs into offline environments without also creating an offline
install index. See :ref:`pymanager-offline` and :ref:`pymanager-admin-config`
@@ -529,25 +549,62 @@ depending on whether it was installed from python.org or through the Windows
Store. Attempting to run the executable directly from Program Files is not
recommended.
-To programmatically install or uninstall the MSIX without using your
-distribution platform's native support, the `Add-AppxPackage
-<https://learn.microsoft.com/powershell/module/appx/add-appxpackage>`_ and
-`Remove-AppxPackage <https://learn.microsoft.com/powershell/module/appx/remove-appxpackage>`_
-PowerShell cmdlets are simplest to use:
+To programmatically install the Python install manager, it is easiest to use
+WinGet, which is included with all supported versions of Windows:
-.. code::
+.. code-block:: powershell
+
+ $> winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity
+
+ # Optionally run the configuration checker and accept all changes
+ $> py install --configure -y
+
+To download the Python install manager and install on another machine, the
+following WinGet command will download the required files from the Store to your
+Downloads directory (add ``-d <location>`` to customize the output location).
+This also generates a YAML file that appears to be unnecessary, as the
+downloaded MSIX can be installed by launching or using the commands below.
+
+.. code-block:: powershell
+
+ $> winget download 9NQ7512CXL7T -e --skip-license --accept-package-agreements --accept-source-agreements
+
+To programmatically install or uninstall an MSIX using only PowerShell, the
+`Add-AppxPackage`_ and `Remove-AppxPackage`_ PowerShell cmdlets are recommended:
+
+.. code-block:: powershell
$> Add-AppxPackage C:\Downloads\python-manager-25.0.msix
...
$> Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
-The native APIs for package management may be found on the Windows
-`PackageManager <https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager>`_
-class. The :func:`!AddPackageAsync` method installs for the current user, or use
-:func:`!StagePackageAsync` followed by :func:`!ProvisionPackageForAllUsersAsync`
-to install the Python install manager for all users from the MSIX package. Users
-will still need to install their own copies of Python itself, as there is no way
-to trigger those installs without being a logged in user.
+The latest release can be downloaded and installed by Windows by passing the
+AppInstaller file to the Add-AppxPackage command. This installs using the MSIX
+on python.org, and is only recommended for cases where installing via the Store
+(interactively or using WinGet) is not possible.
+
+.. code-block:: powershell
+
+ $> Add-AppxPackage -AppInstallerFile https://www.python.org/ftp/python/pymanager/pymanager.appinstaller
+
+Other tools and APIs may also be used to provision an MSIX package for all users
+on a machine, but Python does not consider this a supported scenario. We suggest
+looking into the PowerShell `Add-AppxProvisionedPackage`_ cmdlet, the native
+Windows `PackageManager`_ class, or the documentation and support for your
+deployment tool.
+
+Regardless of the install method, users will still need to install their own
+copies of Python itself, as there is no way to trigger those installs without
+being a logged in user. When using the MSIX, the latest version of Python will
+be available for all users to install without network access.
+
+Note that the MSIX downloadable from the Store and from the Python website are
+subtly different and cannot be installed at the same time. Wherever possible,
+we suggest using the above WinGet commands to download the package from the
+Store to reduce the risk of setting up conflicting installs. There are no
+licensing restrictions on the Python install manager that would prevent using
+the Store package in this way.
+
.. _pymanager-admin-config:
@@ -713,6 +770,16 @@ default).
your ``pythonw.exe`` and ``pyw.exe`` aliases are consistent with your
others.
"
+ "``pip`` gives me a ""command not found"" error when I type it in my
+ terminal.","Have you activated a virtual environment? Run the
+ ``.venv\Scripts\activate`` script in your terminal to activate.
+ "
+ "","The package may be available but missing the generated executable.
+ We recommend using the ``python -m pip`` command instead, or alternatively
+ the ``python -m pip install --force pip`` command will recreate the
+ executables and show you the path to add to :envvar:`PATH`. These scripts are
+ separated for each runtime, and so you may need to add multiple paths.
+ "
.. _windows-embeddable: