Lines Matching refs:Python
6 Using Python on Windows
13 know about when using Python on Microsoft Windows.
16 supported installation of Python. To make Python available, the CPython team
19 are primarily intended to add a per-user installation of Python, with the
24 As specified in :pep:`11`, a Python release only supports a Windows platform
26 Python |version| supports Windows 8.1 and newer. If you require Windows 7
27 support, please install Python 3.8.
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
42 integration systems. It can be used to build Python packages or run scripts,
45 :ref:`windows-embeddable` is a minimal package of Python suitable for
57 Four Python |version| installers are available for download - two each for the
74 * Python will be installed into your user directory
89 * Python will be installed into the Program Files directory
117 Support for long paths was enabled in Python.
129 To completely hide the installer UI and install Python silently, pass the
132 option may be passed to immediately begin removing Python - no confirmation
148 | | for all-user installs | Python X.Y` or :file:`\ |
150 | | | Python X.Y` |
153 | | just-for-me installs | Programs\\Python\\\ |
156 | | | Programs\\Python\\\ |
159 | | | Programs\\Python\\\ |
182 | Include_doc | Install Python manual | 1 |
223 For example, to silently install a default, system-wide Python installation,
228 To allow users to easily install a personal copy of Python without the test
260 As some features of Python are not included in the initial installer download,
282 Once Python has been installed, you can add or remove features through the
283 Programs and Features tool that is part of Windows. Select the Python entry and
289 need to remove and then reinstall Python completely.
294 "Uninstall" will remove Python entirely, with the exception of the
305 The Microsoft Store package is an easily installable Python interpreter that
309 search the Microsoft Store app for "Python |version|". Ensure that the app
310 you select is published by the Python Software Foundation, and install it.
313 Python will always be available for free on the Microsoft Store. If you
316 After installation, Python may be launched by finding it in Start.
325 select which version of Python is associated with each command. It is
332 If you have installed another version of Python and added it to your
337 The ``py.exe`` launcher will detect this Python installation, but will prefer
340 To remove Python, open Settings and use Apps and Features, or else find
341 Python in Start and right-click to select Uninstall. Uninstalling will
342 remove all packages you installed directly into this Python installation, but
351 Because of restrictions on Microsoft Store apps, Python scripts may not have
356 At runtime, Python will use a private copy of well-known Windows folders and the registry.
359 :file:`C:\\Users\\<user>\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8…
372 …'C:\\Users\\example\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\…
394 The nuget.org package is a reduced size Python environment intended for use on
396 install of Python. While nuget is "the package manager for .NET", it also works
400 on using nuget. What follows is a summary that is sufficient for Python
405 tool, the latest version of Python for 64-bit or 32-bit machines is installed
416 contains the Python installation:
422 Python 3.5.2
426 Python 3.5.2
435 C++ project to reference the Python install. Including the settings will
451 The embedded distribution is a ZIP file containing a minimal Python environment.
460 dependents, such as Idle), pip and the Python documentation are not included.
473 Python installation is not supported with this distribution, though with some
481 Python Application
484 An application written in Python does not necessarily require users to be aware
486 private version of Python in an install package. Depending on how transparent it
492 no obvious indications that the program is running on Python: icons can be
499 command-line arguments. In this case, the application will appear to be Python
501 running Python processes or file associations.
504 the Python executable to ensure they are available on the path. With the
508 Embedding Python
512 language, and the embedded Python distribution can be used for this purpose. In
516 installation is sufficient to provide a loadable Python interpreter.
539 "The Next Generation Python Environment and Package Manager".
548 Note that these packages may not include the latest versions of Python or
549 other libraries, and are not maintained or supported by the core Python team.
553 Configuring Python
556 To run Python conveniently from a command prompt, you might consider changing
560 versions of Python, consider using the :ref:`launcher`.
576 C:\>set PATH=C:\Program Files\Python 3.9;%PATH%
587 of Python is launched.
601 The :envvar:`PYTHONPATH` variable is used by all versions of Python,
603 only include code that is compatible with all of your installed Python
620 Finding the Python executable
625 Besides using the automatically created start menu entry for the Python
626 interpreter, you might want to start Python in the command prompt. The
629 On the first page of the installer, an option labelled "Add Python to PATH"
640 of your Python installation, delimited by a semicolon from other entries. An
644 C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python 3.9
654 Page). Python uses it for the default encoding of text files (e.g.
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
666 When the :ref:`Python UTF-8 Mode <utf8-mode>` is enabled, you can still use the
670 will affect all Python 3.7+ applications on your system.
671 If you have any Python 3.7+ applications which rely on the legacy
676 Even when UTF-8 mode is disabled, Python uses UTF-8 by default
686 Python Launcher for Windows
691 The Python launcher for Windows is a utility which aids in locating and
692 executing of different Python versions. It allows scripts (or the
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
711 System-wide installations of Python 3.3 and later will put the launcher on your
713 Python, so it does not matter which version is installed. To check that the
718 You should find that the latest version of Python you have installed is
720 arguments specified will be sent directly to Python.
722 If you have multiple versions of Python installed (e.g., 3.7 and |version|) you
723 will have noticed that Python |version| was started - to launch Python 3.7, try
728 If you want the latest version of Python 2 you have installed, try the
742 displays the currently installed version(s) of Python.
745 which allows selecting a specific Python runtime, including those that may have
760 # Select PythonCore's latest Python 3 runtime
763 The short form of the argument (``-3``) only ever selects from core Python
779 If the launcher is run with no explicit Python version specification, and a
784 the global Python version.
789 Let's create a test Python script - create a file called ``hello.py`` with the
796 sys.stdout.write("hello from Python %s\n" % (sys.version,))
802 You should notice the version number of your latest Python 2.x installation
809 Re-executing the command should now print the latest Python 3.x information.
811 version qualifier. Assuming you have Python 3.7 installed, try changing
816 version of Python 2.x that you have installed. This is for backward
818 typically refers to Python 2.
823 The launcher should have been associated with Python files (i.e. ``.py``,
829 The key benefit of this is that a single launcher can support multiple Python
839 be used with Python scripts on Windows and the examples above demonstrate their
842 To allow shebang lines in Python scripts to be portable between Unix and
857 The default Python will be located and used. As many Python scripts written
882 Before looking for installed Python interpreters, this form will search the
883 executable :envvar:`PATH` for a Python executable matching the name provided
917 Python interpreter. For example, if you have a shebang line:
923 Then Python will be started with the ``-v`` option
943 Customizing default Python versions
947 which version of Python will be used by the command. A version qualifier
960 available with the launcher included with Python 3.7 or newer.)
965 is found, the launcher will enumerate the installed Python versions and use
971 (major.minor) Python version installed, the 64-bit version will always be
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
984 ``python2`` will use the latest Python 2.x version installed and
985 the command ``python3`` will use the latest Python 3.x installed.
991 the latest installed Python 3 version.
995 installed Python (PY_PYTHON was not considered at all as a major
1032 should allow you to see what versions of Python were located, why a
1034 target Python. It is primarily intended for testing and debugging.
1041 launch Python. This may be useful for tools that want to use the launcher to
1042 detect and then launch Python directly. Note that the command written to
1050 value), and the requested Python version is not installed but is available on
1055 to always try to install Python, even if it is detected. This is mainly intended
1061 The following exit codes may be returned by the Python launcher. Unfortunately,
1062 there is no way to distinguish these from the exit code of Python itself.
1073 | RC_CREATE_PROCESS | 101 | Failed to launch Python. |
1110 :samp:`\\SOFTWARE\\Python\\PythonCore\\{version}\\PythonPath` under both the
1117 "Python Home". Otherwise, the path of the main Python executable is used to
1119 the "Python Home". If a Python home is found, the relevant sub-directories
1121 folder. Otherwise, the core Python path is constructed from the PythonPath
1124 * If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
1137 * When running :file:`python.exe`, or any other .exe in the main Python
1142 * When Python is hosted in another .exe (different directory, embedded via COM,
1143 etc), the "Python Home" will not be deduced, so the core path from the
1146 * If Python can't find its home and there are no registry value (frozen .exe,
1150 For those who want to bundle Python into their application or distribution, the
1196 Even though Python aims to be portable among all platforms, there are features
1229 `Python and COM <https://www.boddie.org.uk/python/COM.html>`_
1237 extension (see :ref:`extending-distutils`) which wraps Python scripts into
1240 Python.
1243 Compiling Python on Windows
1252 Visual Studio, which is the compiler used to build the official Python
1263 With ongoing development of Python, some platforms that used to be supported
1269 since Python 3 (if it ever was).
1271 `Python interpreter <https://cygwin.com/packages/summary/python3.html>`__
1274 See `Python for Windows <https://www.python.org/downloads/windows/>`_