@@ -504,6 +504,14 @@ configuration option.
504
504
installing and uninstalling.
505
505
506
506
507
+ .. _Add-AppxPackage :https://learn.microsoft.com/powershell/module/appx/add-appxpackage
508
+
509
+ .. _Remove-AppxPackage :https://learn.microsoft.com/powershell/module/appx/remove-appxpackage
510
+
511
+ .. _Add-AppxProvisionedPackage :https://learn.microsoft.com/powershell/module/dism/add-appxprovisionedpackage
512
+
513
+ .. _PackageManager :https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager
514
+
507
515
.. _pymanager-advancedinstall :
508
516
509
517
Advanced Installation
@@ -559,31 +567,44 @@ downloaded MSIX can be installed by launching or using the commands below.
559
567
560
568
..code-block ::powershell
561
569
562
- $> winget download 9NQ7512CXL7T- e-- skip-license -- accept- package- agreements-- disable-interactivity
570
+ $> winget download 9NQ7512CXL7T- e-- skip-license -- accept- package- agreements-- accept - source - agreements
563
571
564
572
To programmatically install or uninstall an MSIX using only PowerShell, the
565
- `Add-AppxPackage <https://learn.microsoft.com/powershell/module/appx/add-appxpackage >`_
566
- and `Remove-AppxPackage <https://learn.microsoft.com/powershell/module/appx/remove-appxpackage >`_
567
- PowerShell cmdlets are recommended:
573
+ `Add-AppxPackage `_ and `Remove-AppxPackage `_ PowerShell cmdlets are recommended:
568
574
569
575
..code-block ::powershell
570
576
571
577
$> Add-AppxPackage C:\Downloads\python- manager- 25.0 .msix
572
578
...
573
579
$> Get-AppxPackage PythonSoftwareFoundation.PythonManager| Remove-AppxPackage
574
580
575
- The native APIs for package management may be found on the Windows
576
- `PackageManager <https://learn.microsoft.com/uwp/api/windows.management.deployment.packagemanager >`_
577
- class. The:func: `!AddPackageAsync ` method installs for the current user, or use
578
- :func: `!StagePackageAsync ` followed by:func: `!ProvisionPackageForAllUsersAsync `
579
- to install the Python install manager for all users from the MSIX package. Users
580
- will still need to install their own copies of Python itself, as there is no way
581
- to trigger those installs without being a logged in user.
581
+ The latest release can be downloaded and installed by Windows by passing the
582
+ AppInstaller file to the Add-AppxPackage command. This installs using the MSIX
583
+ on python.org, and is only recommended for cases where installing via the Store
584
+ (interactively or using WinGet) is not possible.
585
+
586
+ ..code-block ::powershell
587
+
588
+ $> Add-AppxPackage - AppInstallerFile https:// www.python.org/ ftp/ python/ pymanager/ pymanager.appinstaller
589
+
590
+ Other tools and APIs may also be used to provision an MSIX package for all users
591
+ on a machine, but Python does not consider this a supported scenario. We suggest
592
+ looking into the PowerShell `Add-AppxProvisionedPackage `_ cmdlet, the native
593
+ Windows `PackageManager `_ class, or the documentation and support for your
594
+ deployment tool.
595
+
596
+ Regardless of the install method, users will still need to install their own
597
+ copies of Python itself, as there is no way to trigger those installs without
598
+ being a logged in user. When using the MSIX, the latest version of Python will
599
+ be available for all users to install without network access.
582
600
583
601
Note that the MSIX downloadable from the Store and from the Python website are
584
602
subtly different and cannot be installed at the same time. Wherever possible,
585
- we suggest using the above commands to download the package from the Store to
586
- reduce the risk of setting up conflicting installs.
603
+ we suggest using the above WinGet commands to download the package from the
604
+ Store to reduce the risk of setting up conflicting installs. There are no
605
+ licensing restrictions on the Python install manager that would prevent using
606
+ the Store package in this way.
607
+
587
608
588
609
.. _pymanager-admin-config :
589
610