@@ -385,50 +385,77 @@ The following settings are those that are considered likely to be modified in
385
385
normal use. Later sections list those that are intended for administrative
386
386
customization.
387
387
388
- .. csv-table :: Standard configuration options
389
- :header: "Config Key", "Environment Variable", "Description"
390
- :widths: 2, 2, 4
391
-
392
- ``default_tag ``,``PYTHON_MANAGER_DEFAULT``,"The preferred default
393
- version to launch or install. By default, this is interpreted as the most
394
- recent non-prerelease version from the CPython team.
395
- "
396
- ``default_platform ``,``PYTHON_MANAGER_DEFAULT_PLATFORM``,"The preferred
397
- default platform to launch or install. This is treated as a suffix to the
398
- specified tag, such that ``py -V:3.14 `` would prefer an install for
399
- ``3.14-64 `` if it exists (and ``default_platform `` is ``-64 ``), but will use
400
- ``3.14 `` if no tagged install exists.
401
- "
402
- ``logs_dir ``,``PYTHON_MANAGER_LOGS``,"The location where log files are
403
- written. By default, :file: `%TEMP% `.
404
- "
405
- ``automatic_install ``,``PYTHON_MANAGER_AUTOMATIC_INSTALL``,"True to
406
- allow automatic installs when specifying a particular runtime to launch.
407
- By default, true.
408
- "
409
- ``include_unmanaged ``,``PYTHON_MANAGER_INCLUDE_UNMANAGED``,"True to
410
- allow listing and launching runtimes that were not installed by the Python
411
- install manager, or false to exclude them. By default, true.
412
- "
413
- ``shebang_can_run_anything ``,"``PYTHON_MANAGER_SHEBANG_CAN_RUN_ANYTHING ``
414
- ","True to allow shebangs in ``.py `` files to launch applications other than
415
- Python runtimes, or false to prevent it. By default, true.
416
- "
417
- ``log_level ``,"``PYMANAGER_VERBOSE ``, ``PYMANAGER_DEBUG ``","Set
418
- the default level of output (0-50) By default, 20. Lower values produce more
419
- output. The environment variables are boolean, and may produce additional
420
- output during startup that is later suppressed by other configuration.
421
- "
422
- ``confirm ``,``PYTHON_MANAGER_CONFIRM``,"True to confirm certain actions
423
- before taking them (such as uninstall), or false to skip the confirmation. By
424
- default, true.
425
- "
426
- ``install.source ``,``PYTHON_MANAGER_SOURCE_URL``,"Override the index
427
- feed to obtain new installs from.
428
- "
429
- ``list.format ``,``PYTHON_MANAGER_LIST_FORMAT``,"Specify the default
430
- format used by the ``py list `` command. By default, ``table ``.
431
- "
388
+ .. Sphinx bug with text writer; remove widths & caption temporarily
389
+ .. :widths: 2, 2, 4
390
+
391
+ .. rubric :: Standard configuration options
392
+
393
+ .. list-table ::
394
+ :header-rows: 1
395
+
396
+ * - Config Key
397
+ - Environment Variable
398
+ - Description
399
+
400
+ * - ``default_tag ``
401
+ - ``PYTHON_MANAGER_DEFAULT ``
402
+ - The preferred default version to launch or install.
403
+ By default, this is interpreted as the most recent non-prerelease version
404
+ from the CPython team.
405
+
406
+ * - ``default_platform ``
407
+ - ``PYTHON_MANAGER_DEFAULT_PLATFORM ``
408
+ - The preferred default platform to launch or install.
409
+ This is treated as a suffix to the specified tag, such that ``py -V:3.14 ``
410
+ would prefer an install for ``3.14-64 `` if it exists
411
+ (and ``default_platform `` is ``-64 ``),
412
+ but will use ``3.14 `` if no tagged install exists.
413
+
414
+ * - ``logs_dir ``
415
+ - ``PYTHON_MANAGER_LOGS ``
416
+ - The location where log files are written.
417
+ By default, :file: `%TEMP% `.
418
+
419
+ * - ``automatic_install ``
420
+ - ``PYTHON_MANAGER_AUTOMATIC_INSTALL ``
421
+ - True to allow automatic installs when specifying a particular runtime
422
+ to launch.
423
+ By default, true.
424
+
425
+ * - ``include_unmanaged ``
426
+ - ``PYTHON_MANAGER_INCLUDE_UNMANAGED ``
427
+ - True to allow listing and launching runtimes that were not installed
428
+ by the Python install manager, or false to exclude them.
429
+ By default, true.
430
+
431
+ * - ``shebang_can_run_anything ``
432
+ - ``PYTHON_MANAGER_SHEBANG_CAN_RUN_ANYTHING ``
433
+ - True to allow shebangs in ``.py `` files to launch applications other than
434
+ Python runtimes, or false to prevent it.
435
+ By default, true.
436
+
437
+ * - ``log_level ``
438
+ - ``PYMANAGER_VERBOSE ``, ``PYMANAGER_DEBUG ``
439
+ - Set the default level of output (0-50).
440
+ By default, 20.
441
+ Lower values produce more output.
442
+ The environment variables are boolean, and may produce additional
443
+ output during startup that is later suppressed by other configuration.
444
+
445
+ * - ``confirm ``
446
+ - ``PYTHON_MANAGER_CONFIRM ``
447
+ - True to confirm certain actions before taking them (such as uninstall),
448
+ or false to skip the confirmation.
449
+ By default, true.
450
+
451
+ * - ``install.source ``
452
+ - ``PYTHON_MANAGER_SOURCE_URL ``
453
+ - Override the index feed to obtain new installs from.
454
+
455
+ * - ``list.format ``
456
+ - ``PYTHON_MANAGER_LIST_FORMAT ``
457
+ - Specify the default format used by the ``py list `` command.
458
+ By default, ``table ``.
432
459
433
460
Dotted names should be nested inside JSON objects, for example, ``list.format ``
434
461
would be specified as ``{"list": {"format": "table"}} ``.
@@ -492,7 +519,7 @@ which the path to the script and any additional arguments will be appended.
492
519
This functionality may be disabled by the ``shebang_can_run_anything ``
493
520
configuration option.
494
521
495
- .. note:
522
+ .. note ::
496
523
497
524
The behaviour of shebangs in the Python install manager is subtly different
498
525
from the previous ``py.exe `` launcher, and the old configuration options no
@@ -638,46 +665,64 @@ variable will be used instead.
638
665
Configuration settings that are paths are interpreted as relative to the
639
666
directory containing the configuration file that specified them.
640
667
641
- .. csv-table :: Administrative configuration options
642
- :header: "Config Key", "Description"
643
- :widths: 1, 4
644
-
645
- ``base_config ``,"The highest priority configuration file to read. Note that
646
- only the built-in configuration file and the registry can modify this
647
- setting.
648
- "
649
- ``user_config ``,"The second configuration file to read.
650
- "
651
- ``additional_config ``,"The third configuration file to read.
652
- "
653
- ``registry_override_key ``,"Registry location to check for overrides. Note
654
- that only the built-in configuration file can modify this setting.
655
- "
656
- ``bundled_dir ``,"Read-only directory containing locally cached files.
657
- "
658
- ``install.fallback_source ``,"Path or URL to an index to consult when the
659
- main index cannot be accessed.
660
- "
661
- ``install.enable_shortcut_kinds ``,"Comma-separated list of shortcut kinds
662
- to allow (e.g. ``""pep514,start"" ``). Enabled shortcuts may still be disabled
663
- by ``disable_shortcut_kinds ``.
664
- "
665
- ``install.disable_shortcut_kinds ``,"Comma-separated list of shortcut kinds
666
- to exclude (e.g. ``""pep514,start"" ``). Disabled shortcuts are not
667
- reactivated by ``enable_shortcut_kinds ``.
668
- "
669
- ``pep514_root ``,"Registry location to read and write PEP 514 entries into.
670
- By default, :file: `HKEY_CURRENT_USER\\ Software\\ Python `.
671
- "
672
- ``start_folder ``,"Start menu folder to write shortcuts into. By default,
673
- ``Python ``. This path is relative to the user's Programs folder.
674
- "
675
- ``virtual_env ``,"Path to the active virtual environment. By default, this
676
- is ``%VIRTUAL_ENV% ``, but may be set empty to disable venv detection.
677
- "
678
- ``shebang_can_run_anything_silently ``,"True to suppress visible warnings
679
- when a shebang launches an application other than a Python runtime.
680
- "
668
+ .. Sphinx bug with text writer; remove widths & caption temporarily
669
+ .. :widths: 1, 4
670
+
671
+ .. rubric :: Administrative configuration options
672
+
673
+ .. list-table ::
674
+ :header-rows: 1
675
+
676
+ * - Config Key
677
+ - Description
678
+
679
+ * - ``base_config ``
680
+ - The highest priority configuration file to read.
681
+ Note that only the built-in configuration file and the registry can
682
+ modify this setting.
683
+
684
+ * - ``user_config ``
685
+ - The second configuration file to read.
686
+
687
+ * - ``additional_config ``
688
+ - The third configuration file to read.
689
+
690
+ * - ``registry_override_key ``
691
+ - Registry location to check for overrides.
692
+ Note that only the built-in configuration file can modify this setting.
693
+
694
+ * - ``bundled_dir ``
695
+ - Read-only directory containing locally cached files.
696
+
697
+ * - ``install.fallback_source ``
698
+ - Path or URL to an index to consult when the main index cannot be accessed.
699
+
700
+ * - ``install.enable_shortcut_kinds ``
701
+ - Comma-separated list of shortcut kinds to allow (e.g. ``"pep514,start" ``).
702
+ Enabled shortcuts may still be disabled by ``disable_shortcut_kinds ``.
703
+
704
+ * - ``install.disable_shortcut_kinds ``
705
+ - Comma-separated list of shortcut kinds to exclude
706
+ (e.g. ``"pep514,start" ``).
707
+ Disabled shortcuts are not reactivated by ``enable_shortcut_kinds ``.
708
+
709
+ * - ``pep514_root ``
710
+ - Registry location to read and write PEP 514 entries into.
711
+ By default, :file: `HKEY_CURRENT_USER\\ Software\\ Python `.
712
+
713
+ * - ``start_folder ``
714
+ - Start menu folder to write shortcuts into.
715
+ By default, ``Python ``.
716
+ This path is relative to the user's Programs folder.
717
+
718
+ * - ``virtual_env ``
719
+ - Path to the active virtual environment.
720
+ By default, this is ``%VIRTUAL_ENV% ``, but may be set empty
721
+ to disable venv detection.
722
+
723
+ * - ``shebang_can_run_anything_silently ``
724
+ - True to suppress visible warnings when a shebang launches an application
725
+ other than a Python runtime.
681
726
682
727
.. _install-freethreaded-windows :
683
728
@@ -716,70 +761,89 @@ issue at `our bug tracker <https://github.com/python/cpython/issues>`_,
716
761
including any relevant log files (written to your :file: `%TEMP% ` directory by
717
762
default).
718
763
719
- .. csv-table :: Troubleshooting
720
- :header: "Symptom", "Things to try"
721
- :widths: 1, 1
722
-
723
- "``python `` gives me a ""command not found"" error or opens the Store app
724
- when I type it in my terminal.", "Did you :ref: `install the Python install
725
- manager <pymanager>`?
726
- "
727
- "", "Click Start, open ""Manage app execution aliases"", and check that the
728
- aliases for ""Python (default)"" are enabled. If they already are, try
729
- disabling and re-enabling to refresh the command. The ""Python (default
730
- windowed)"" and ""Python install manager"" commands may also need refreshing.
731
- "
732
- "", "Check that the ``py `` and ``pymanager `` commands work.
733
- "
734
- "``py `` gives me a ""command not found"" error when I type it in my
735
- terminal.","Did you :ref: `install the Python install manager <pymanager >`?
736
- "
737
- "", "Click Start, open ""Manage app execution aliases"", and check that the
738
- aliases for ""Python install manager"" are enabled. If they already are, try
739
- disabling and re-enabling to refresh the command. The ""Python (default
740
- windowed)"" and ""Python install manager"" commands may also need refreshing.
741
- "
742
- "``py `` gives me a ""can't open file"" error when I type commands in my
743
- terminal.", "This usually means you have the legacy launcher installed and it
744
- has priority over the Python install manager. To remove, click Start, open
745
- ""Installed apps"", search for ""Python launcher"" and uninstall it.
746
- "
747
- "``python `` doesn't launch the same runtime as ``py ``", "Click Start, open
748
- ""Installed apps"", look for any existing Python runtimes, and either remove
749
- them or Modify and disable the :envvar: `PATH ` options.
750
- "
751
- "", "Click Start, open ""Manage app execution aliases"", and check that your
752
- ``python.exe `` alias is set to ""Python (default)""
753
- "
754
- "``python `` and ``py `` don't launch the runtime I expect", "Check your
755
- ``PYTHON_MANAGER_DEFAULT `` environment variable or ``default_tag ``
756
- configuration. The ``py list `` command will show your default based on these
757
- settings.
758
- "
759
- "", "Installs that are managed by the Python install manager will be chosen
760
- ahead of unmanaged installs. Use ``py install `` to install the runtime you
761
- expect, or configure your default tag.
762
- "
763
- "", "Prerelease and experimental installs that are not managed by the Python
764
- install manager may be chosen ahead of stable releases. Configure your
765
- default tag or uninstall the prerelease runtime and reinstall using ``py
766
- install ``.
767
- "
768
- "``pythonw `` or ``pyw `` don't launch the same runtime as ``python `` or
769
- ``py ``","Click Start, open ""Manage app execution aliases"", and check that
770
- your ``pythonw.exe `` and ``pyw.exe `` aliases are consistent with your
771
- others.
772
- "
773
- "``pip `` gives me a ""command not found"" error when I type it in my
774
- terminal.","Have you activated a virtual environment? Run the
775
- ``.venv\Scripts\activate `` script in your terminal to activate.
776
- "
777
- "","The package may be available but missing the generated executable.
778
- We recommend using the ``python -m pip `` command instead, or alternatively
779
- the ``python -m pip install --force pip `` command will recreate the
780
- executables and show you the path to add to :envvar: `PATH `. These scripts are
781
- separated for each runtime, and so you may need to add multiple paths.
782
- "
764
+ .. Sphinx bug with text writer; remove widths & caption temporarily
765
+ .. :widths: 1, 1
766
+
767
+ .. rubric :: Troubleshooting
768
+
769
+ .. list-table ::
770
+ :header-rows: 1
771
+
772
+ * - Symptom
773
+ - Things to try
774
+
775
+ * - ``python `` gives me a "command not found" error or opens the Store app
776
+ when I type it in my terminal.
777
+ - Did you :ref: `install the Python install manager <pymanager >`?
778
+
779
+ * -
780
+ - Click Start, open "Manage app execution aliases", and check that the
781
+ aliases for "Python (default)" are enabled.
782
+ If they already are, try disabling and re-enabling to refresh the command.
783
+ The "Python (default windowed)" and "Python install manager" commands
784
+ may also need refreshing.
785
+
786
+ * -
787
+ - Check that the ``py `` and ``pymanager `` commands work.
788
+
789
+ * - ``py `` gives me a "command not found" error when I type it in my terminal.
790
+ - Did you :ref: `install the Python install manager <pymanager >`?
791
+
792
+ * -
793
+ - Click Start, open "Manage app execution aliases", and check that the
794
+ aliases for "Python (default)" are enabled.
795
+ If they already are, try disabling and re-enabling to refresh the command.
796
+ The "Python (default windowed)" and "Python install manager" commands
797
+ may also need refreshing.
798
+
799
+ * - ``py `` gives me a "can't open file" error when I type commands in my
800
+ terminal.
801
+ - This usually means you have the legacy launcher installed and
802
+ it has priority over the Python install manager.
803
+ To remove, click Start, open "Installed apps",
804
+ search for "Python launcher" and uninstall it.
805
+
806
+ * - ``python `` doesn't launch the same runtime as ``py ``
807
+ - Click Start, open "Installed apps", look for any existing Python runtimes,
808
+ and either remove them or Modify and disable the :envvar: `PATH ` options.
809
+
810
+ * -
811
+ - Click Start, open "Manage app execution aliases", and check that your
812
+ ``python.exe `` alias is set to "Python (default)"
813
+
814
+ * - ``python `` and ``py `` don't launch the runtime I expect
815
+ - Check your ``PYTHON_MANAGER_DEFAULT `` environment variable
816
+ or ``default_tag `` configuration.
817
+ The ``py list `` command will show your default based on these settings.
818
+
819
+ * -
820
+ - Installs that are managed by the Python install manager will be chosen
821
+ ahead of unmanaged installs.
822
+ Use ``py install `` to install the runtime you expect,
823
+ or configure your default tag.
824
+
825
+ * -
826
+ - Prerelease and experimental installs that are not managed by the Python
827
+ install manager may be chosen ahead of stable releases.
828
+ Configure your default tag or uninstall the prerelease runtime
829
+ and reinstall using ``py install ``.
830
+
831
+ * - ``pythonw `` or ``pyw `` don't launch the same runtime as ``python `` or ``py ``
832
+ - Click Start, open "Manage app execution aliases", and check that your
833
+ ``pythonw.exe `` and ``pyw.exe `` aliases are consistent with your others.
834
+
835
+ * - ``pip `` gives me a "command not found" error when I type it in my terminal.
836
+ - Have you activated a virtual environment?
837
+ Run the ``.venv\Scripts\activate `` script in your terminal to activate.
838
+
839
+ * -
840
+ - The package may be available but missing the generated executable.
841
+ We recommend using the ``python -m pip `` command instead,
842
+ or alternatively the ``python -m pip install --force pip `` command
843
+ will recreate the executables and show you the path to
844
+ add to :envvar: `PATH `.
845
+ These scripts are separated for each runtime, and so you may need to
846
+ add multiple paths.
783
847
784
848
785
849
.. _windows-embeddable :
0 commit comments