Skip to content

Commit f9b22bb

Browse files
authored
gh-133469: Adds to advanced section on installing PyManager (GH-133471)
1 parent d270bb5 commit f9b22bb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Doc/using/windows.rst

+19
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,25 @@ depending on whether it was installed from python.org or through the Windows
529529
Store. Attempting to run the executable directly from Program Files is not
530530
recommended.
531531

532+
To programmatically install or uninstall the MSIX without using your
533+
distribution platform's native support, the `Add-AppxPackage
534+
<https://learn.microsoft.com/powershell/module/appx/add-appxpackage>`_ and
535+
`Remove-AppxPackage <https://learn.microsoft.com/powershell/module/appx/remove-appxpackage>`_
536+
PowerShell cmdlets are simplest to use:
537+
538+
.. code::
539+
540+
$> Add-AppxPackage C:\Downloads\python-manager-25.0.msix
541+
...
542+
$> Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
543+
544+
The native APIs for package management may be found on the Windows
545+
`PackageManager <https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager>`_
546+
class. The :func:`!AddPackageAsync` method installs for the current user, or use
547+
:func:`!StagePackageAsync` followed by :func:`!ProvisionPackageForAllUsersAsync`
548+
to install the Python install manager for all users from the MSIX package. Users
549+
will still need to install their own copies of Python itself, as there is no way
550+
to trigger those installs without being a logged in user.
532551

533552
.. _pymanager-admin-config:
534553

0 commit comments

Comments
 (0)