]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-133469: Adds to advanced section on installing PyManager (GH-133471)
authorSteve Dower <steve.dower@python.org>
Mon, 5 May 2025 22:23:08 +0000 (23:23 +0100)
committerGitHub <noreply@github.com>
Mon, 5 May 2025 22:23:08 +0000 (23:23 +0100)
Doc/using/windows.rst

index 57c6062ee43a22de4ddf9228c6cd07425e71c29f..74d6db5d7d1a98b6d4026a118a5f5d38a1a5c8bb 100644 (file)
@@ -529,6 +529,25 @@ 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:
+
+.. code::
+
+   $> 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.
 
 .. _pymanager-admin-config: