• Home
  • Raw
  • Download

Lines Matching +full:curl +full:- +full:for +full:- +full:win

3 .. _using-on-windows:
12 This document aims to give an overview of Windows-specific behaviour you should
18 <https://www.python.org/download/releases/>`_ for many years. These installers
19 are primarily intended to add a per-user installation of Python, with the
21 able to install for all users of a single machine, and a separate ZIP file is
22 available for application-local distributions.
29 There are a number of different installers available for Windows, each with
32 :ref:`windows-full` contains all components and is the best option for
33 developers using Python for any kind of project.
35 :ref:`windows-store` is a simple installation of Python that is suitable for
38 programs. It also provides many convenient commands for launching Python and
41 :ref:`windows-nuget` are lightweight installations intended for continuous
45 :ref:`windows-embeddable` is a minimal package of Python suitable for
49 .. _windows-full:
55 ------------------
57 Four Python |version| installers are available for download - two each for the
58 32-bit and 64-bit versions of the interpreter. The *web installer* is a small
60 necessary. The *offline installer* includes the components necessary for a
61 default installation and only requires an internet connection for optional
62 features. See :ref:`install-layout-option` for other ways to avoid downloading
71 * You will *not* need to be an administrator (unless a system update for the
72 C Runtime Library is required or you install the :ref:`launcher` for all
79 * Shortcuts will only be visible for the current user
82 install, the installation location and other options or post-install actions.
85 To perform an all-users installation, you should select "Customize
92 * The standard library can be pre-compiled to bytecode
94 * Shortcuts are available for all users
96 .. _max-path:
99 --------------------------------
117 Support for long paths was enabled in Python.
119 .. _install-quiet-option:
122 ---------------------
132 option may be passed to immediately begin removing Python - no confirmation
139 +---------------------------+--------------------------------------+--------------------------+
142 | InstallAllUsers | Perform a system-wide installation. | 0 |
143 +---------------------------+--------------------------------------+--------------------------+
146 +---------------------------+--------------------------------------+--------------------------+
148 | | for all-user installs | Python X.Y` or :file:`\ |
151 +---------------------------+--------------------------------------+--------------------------+
152 | DefaultJustForMeTargetDir | The default install directory for | :file:`%LocalAppData%\\\ |
153 | | just-for-me installs | Programs\\Python\\\ |
157 | | | PythonXY-32` or |
160 | | | PythonXY-64` |
161 +---------------------------+--------------------------------------+--------------------------+
164 +---------------------------+--------------------------------------+--------------------------+
167 +---------------------------+--------------------------------------+--------------------------+
170 +---------------------------+--------------------------------------+--------------------------+
174 +---------------------------+--------------------------------------+--------------------------+
178 +---------------------------+--------------------------------------+--------------------------+
179 | Shortcuts | Create shortcuts for the interpreter,| 1 |
181 +---------------------------+--------------------------------------+--------------------------+
183 +---------------------------+--------------------------------------+--------------------------+
185 +---------------------------+--------------------------------------+--------------------------+
189 +---------------------------+--------------------------------------+--------------------------+
193 +---------------------------+--------------------------------------+--------------------------+
195 +---------------------------+--------------------------------------+--------------------------+
196 | InstallLauncherAllUsers | Installs the launcher for all | 1 |
199 +---------------------------+--------------------------------------+--------------------------+
203 +---------------------------+--------------------------------------+--------------------------+
205 +---------------------------+--------------------------------------+--------------------------+
207 +---------------------------+--------------------------------------+--------------------------+
209 +---------------------------+--------------------------------------+--------------------------+
211 +---------------------------+--------------------------------------+--------------------------+
213 +---------------------------+--------------------------------------+--------------------------+
216 +---------------------------+--------------------------------------+--------------------------+
218 +---------------------------+--------------------------------------+--------------------------+
221 +---------------------------+--------------------------------------+--------------------------+
223 For example, to silently install a default, system-wide Python installation,
226 python-3.9.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
232 python-3.9.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
233 SimpleInstall=1 SimpleInstallDescription="Just for me, no test suite."
236 recommended for per-user installs when there is also a system-wide installation
245 .. code-block:: xml
252 <Option Name="SimpleInstallDescription">Just for me, no test suite</Option>
255 .. _install-layout-option:
258 ------------------------------
262 need, all possible components may be downloaded on-demand to create a complete
269 required files. Remember to substitute ``python-3.9.0.exe`` for the actual
275 python-3.9.0.exe /layout [optional target directory]
280 --------------------
286 "Modify" allows you to add or remove features by modifying the checkboxes -
298 .. _windows-store:
306 is intended mainly for interactive use, for example, by students.
309 search the Microsoft Store app for "Python |version|". Ensure that the app
313 Python will always be available for free on the Microsoft Store. If you
314 are asked to pay for it, you have not selected the correct package.
321 All three commands are also available with version number suffixes, for
329 Virtual environments can be created with ``python -m venv`` and activated
341 Python in Start and right-click to select Uninstall. Uninstalling will
346 ------------
356 At runtime, Python will use a private copy of well-known Windows folders and the registry.
357 For example, if the environment variable :envvar:`%APPDATA%` is :file:`c:\\Users\\<user>\\AppData\\…
362 real Windows directory. For example reading :file:`C:\\Windows\\System32` returns the contents of :…
367 .. code-block:: python
381 For more detail on the technical basis for these limitations, please consult
382 Microsoft's documentation on packaged full-trust apps, currently available at
383 `docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
384 <https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes>`_
387 .. _windows-nuget:
394 The nuget.org package is a reduced size Python environment intended for use on
395 continuous integration and build systems that do not have a system-wide
396 install of Python. While nuget is "the package manager for .NET", it also works
397 perfectly fine for packages containing build-time tools.
399 Visit `nuget.org <https://www.nuget.org/>`_ for the most up-to-date information
400 on using nuget. What follows is a summary that is sufficient for Python
404 ``https://aka.ms/nugetclidl``, for example, using curl or PowerShell. With the
405 tool, the latest version of Python for 64-bit or 32-bit machines is installed
408 nuget.exe install python -ExcludeVersion -OutputDirectory .
409 nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory .
411 To select a particular version, add a ``-Version 3.x.y``. The output directory
414 and without the ``-ExcludeVersion`` option this name will include the specific
418 .. code-block:: doscon
420 # Without -ExcludeVersion
421 > .\python.3.5.2\tools\python.exe -V
424 # With -ExcludeVersion
425 > .\python\tools\python.exe -V
429 installed side-by-side and referenced using the full path. Alternatively,
440 for the 64-bit version and `www.nuget.org/packages/pythonx86
441 <https://www.nuget.org/packages/pythonx86>`_ for the 32-bit version.
444 .. _windows-embeddable:
452 It is intended for acting as part of another application, rather than being
453 directly accessed by end-users.
457 installed packages. The standard library is included as pre-compiled and
465 …<https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist#visual-studio-2015-2017-2…
471 Third-party packages should be installed by the application installer alongside
472 the embedded distribution. Using pip to manage dependencies as for a regular
474 care it may be possible to include and use pip for automatic updates. In
475 general, third-party packages should be treated as part of the application
479 The two recommended use cases for this distribution are described below.
482 ------------------
491 the most transparent experience for users. With a customized launcher, there are
495 able to call ``Py_Main`` with a hard-coded command line.
499 command-line arguments. In this case, the application will appear to be Python
509 ----------------
512 language, and the embedded Python distribution can be used for this purpose. In
514 either invoke ``python.exe`` or directly use ``python3.dll``. For either case,
532 Installer with multi-platform compatibility, documentation, PyWin32
542 …thought.com/hc/en-us/articles/360038600051-Canopy-GUI-end-of-life-transition-to-the-Enthought-Depl…
545 Windows-specific distribution with prebuilt scientific packages and
546 tools for building packages.
558 option to configure the PATH and PATHEXT variables for you, this is only
559 reliable for a single, system-wide installation. If you regularly use multiple
563 .. _setting-envvars:
566 ---------------------------------------
574 .. code-block:: doscon
590 for 'edit environment variables', or open System properties, :guilabel:`Advanced
593 System variables, you need non-restricted access to your machine
608 https://docs.microsoft.com/en-us/windows/win32/procthread/environment-variables
611 https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1
612 The ``set`` command, for temporarily modifying environment variables
614 https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx
615 The ``setx`` command, for permanently modifying environment variables
618 .. _windows-path-mod:
621 -----------------------------
625 Besides using the automatically created start menu entry for the Python
627 installer has an option to set that up for you.
633 :command:`pip` for the package installer. Thus, you can also execute your
634 scripts with command line options, see :ref:`using-on-cmdline` documentation.
636 If you don't enable this option at install time, you can always re-run the
638 modify the :envvar:`PATH` using the directions in :ref:`setting-envvars`. You
646 .. _win-utf8-mode:
648 UTF-8 mode
653 Windows still uses legacy encodings for the system encoding (the ANSI Code
654 Page). Python uses it for the default encoding of text files (e.g.
657 This may cause issues because UTF-8 is widely used on the internet
658 and most Unix systems, including WSL (Windows Subsystem for Linux).
660 You can use the :ref:`Python UTF-8 Mode <utf8-mode>` to change the default text
661 encoding to UTF-8. You can enable the :ref:`Python UTF-8 Mode <utf8-mode>` via
662 the ``-X utf8`` command line option, or the ``PYTHONUTF8=1`` environment
663 variable. See :envvar:`PYTHONUTF8` for enabling UTF-8 mode, and
664 :ref:`setting-envvars` for how to modify environment variables.
666 When the :ref:`Python UTF-8 Mode <utf8-mode>` is enabled, you can still use the
673 temporarily or use the ``-X utf8`` command line option.
676 Even when UTF-8 mode is disabled, Python uses UTF-8 by default
677 on Windows for:
679 * Console I/O including standard I/O (see :pep:`528` for details).
681 (see :pep:`529` for details).
686 Python Launcher for Windows
691 The Python launcher for Windows is a utility which aids in locating and
693 command-line) to indicate a preference for a specific Python version, and
697 appropriate version of Python. It will prefer per-user installations over
698 system-wide ones, and orders by language version rather than using the most
704 ---------------
706 From the command-line
711 System-wide installations of Python 3.3 and later will put the launcher on your
719 started - it can be exited as normal, and any additional command-line
723 will have noticed that Python |version| was started - to launch Python 3.7, try
726 py -3.7
731 py -2
740 py --list
744 The ``-x.y`` argument is the short form of the ``-V:Company/Tag`` argument,
747 :pep:`514` will be discoverable. The ``--list`` command lists all available
748 runtimes using the ``-V:`` format.
750 When using the ``-V:`` argument, specifying the Company will limit selection to
755 py -V:3
758 py -V:PythonCore/
761 py -V:PythonCore/3
763 The short form of the argument (``-3``) only ever selects from core Python
764 releases, and not other distributions. However, the longer form (``-V:3``) will
767 The Company is matched on the full string, case-insenitive. The Tag is matched
769 hyphen. This allows ``-V:3.1`` to match ``3.1-32``, but not ``3.10``. Tags are
771 compared using text (``-V:3.01`` does not match ``3.1``).
789 Let's create a test Python script - create a file called ``hello.py`` with the
792 .. code-block:: python
805 .. code-block:: python
809 Re-executing the command should now print the latest Python 3.x information.
810 As with the above command-line examples, you can specify a more explicit
816 version of Python 2.x that you have installed. This is for backward
817 compatibility and for compatibility with Unix, where the command ``python``
825 when you double-click on one of these files from Windows explorer the launcher
833 -------------
837 support for such lines and they are commonly used on such systems to indicate
851 For example, if the first line of your script starts with
853 .. code-block:: sh
865 Furthermore the 32-bit version can be requested by adding "-32" after the
866 minor version. I.e. ``/usr/bin/python3.7-32`` will request usage of the
867 32-bit python 3.7.
871 Beginning with python launcher 3.7 it is possible to request 64-bit version
872 by the "-64" suffix. Furthermore it is possible to specify a major and
873 architecture without minor (i.e. ``/usr/bin/python3-64``).
877 The "-64" suffix is deprecated, and now implies "any architecture that is
878 not provably i386/32-bit". To request a specific environment, use the new
879 ``-V:<TAG>`` argument with the complete tag.
882 Before looking for installed Python interpreters, this form will search the
883 executable :envvar:`PATH` for a Python executable matching the name provided
888 described for the other virtual commands.
893 ``[commands]`` section of the launcher's :ref:`.INI file <launcher-ini>`.
894 This may be used to handle certain commands in a way that makes sense for your
900 .. code-block:: ini
907 This is a convenience for Windows-only scripts, such as those generated by an
908 installer, since the behavior is not compatible with Unix-style shells.
914 --------------------------
917 Python interpreter. For example, if you have a shebang line:
919 .. code-block:: sh
921 #! /usr/bin/python -v
923 Then Python will be started with the ``-v`` option
926 -------------
928 .. _launcher-ini:
933 Two .ini files will be searched by the launcher - ``py.ini`` in the current
936 used for both the 'console' version of the launcher (i.e. py.exe) and for the
950 if a 32 or 64 bit implementation shall be requested by adding "-32" or "-64".
952 For example, a shebang line of ``#!python`` has no version qualifier, while
959 "3.7", "3.7-32" or "3.7-64". (Note that the "-64" option is only
966 the latest minor release found for the major version, which is likely,
970 On 64-bit Windows with both 32-bit and 64-bit implementations of the same
971 (major.minor) Python version installed, the 64-bit version will always be
972 preferred. This will be true for both 32-bit and 64-bit implementations of the
973 launcher - a 32-bit launcher will prefer to execute a 64-bit Python installation
977 whether a 32 or 64-bit version of Python and corresponding launcher was
978 installed last). As noted above, an optional "-32" or "-64" suffix can be
993 * If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit
1008 For example:
1012 .. code-block:: ini
1020 .. code-block:: ini
1027 -----------
1033 particular version was chosen and the exact command-line used to execute the
1034 target Python. It is primarily intended for testing and debugging.
1037 -------
1041 launch Python. This may be useful for tools that want to use the launcher to
1043 standard output is always encoded using UTF-8, and may not render correctly in
1047 -----------------
1056 for testing (and should be used with :envvar:`PYLAUNCHER_DRYRUN`).
1059 ------------
1064 The names of codes are as used in the sources, and are only for reference. There
1068 +-------------------+-------+-----------------------------------------------+
1072 +-------------------+-------+-----------------------------------------------+
1074 +-------------------+-------+-----------------------------------------------+
1076 | | | need to be re-run after it completes. |
1077 +-------------------+-------+-----------------------------------------------+
1079 +-------------------+-------+-----------------------------------------------+
1082 +-------------------+-------+-----------------------------------------------+
1084 +-------------------+-------+-----------------------------------------------+
1087 +-------------------+-------+-----------------------------------------------+
1095 These notes supplement the description at :ref:`sys-path-init` with
1105 :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
1112 semicolon-delimited path strings as their default value will cause each path
1119 the "Python Home". If a Python home is found, the relevant sub-directories
1120 added to :data:`sys.path` (``Lib``, ``plat-win``, etc) are based on that
1126 relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
1150 For those who want to bundle Python into their application or distribution, the
1165 * If you cannot use the previous suggestions (for example, you are a
1171 These will ensure that the files in a system-wide installation will not take
1175 non-standard paths in the registry and user site-packages.
1200 The Windows-specific standard modules are documented in
1201 :ref:`mswin-specific-services`.
1204 -------
1207 is a collection of modules for advanced Windows-specific support. This includes
1208 utilities for:
1211 <https://docs.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal>`_
1217 <https://docs.microsoft.com/en-us/cpp/mfc/mfc-desktop-applications>`_
1222 shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
1234 ---------
1236 `cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ is a :mod:`distutils`
1237 extension (see :ref:`extending-distutils`) which wraps Python scripts into
1249 <https://devguide.python.org/setup/#get-the-source-code>`_.
1251 The source tree contains a build solution and project files for Microsoft
1255 Check :file:`PCbuild/readme.txt` for general information on the build process.
1257 For extension modules, consult :ref:`building-on-windows`.
1265 Check :pep:`11` for details on all unsupported platforms.
1274 See `Python for Windows <https://www.python.org/downloads/windows/>`_
1275 for detailed information about platforms with pre-compiled installers.