• Home
  • Raw
  • Download

Lines Matching +full:python3 +full:- +full:virtualenv

3 .. _using-on-windows:
12 This document aims to give an overview of Windows-specific behaviour you should
19 are primarily intended to add a per-user installation of Python, with the
22 available for application-local distributions.
32 :ref:`windows-full` contains all components and is the best option for
35 :ref:`windows-store` is a simple installation of Python that is suitable for
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
62 features. See :ref:`install-layout-option` for other ways to avoid downloading
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
96 .. _max-path:
99 --------------------------------
119 .. _install-quiet-option:
122 ---------------------
132 option may be passed to immediately begin removing Python - no prompt will be
139 +---------------------------+--------------------------------------+--------------------------+
142 | InstallAllUsers | Perform a system-wide installation. | 0 |
143 +---------------------------+--------------------------------------+--------------------------+
146 +---------------------------+--------------------------------------+--------------------------+
148 | | for all-user installs | Python X.Y` or :file:`\ |
151 +---------------------------+--------------------------------------+--------------------------+
153 | | just-for-me installs | Programs\\PythonXY` or |
155 | | | Programs\\PythonXY-32` or|
157 | | | Programs\\PythonXY-64` |
158 +---------------------------+--------------------------------------+--------------------------+
161 +---------------------------+--------------------------------------+--------------------------+
164 +---------------------------+--------------------------------------+--------------------------+
167 +---------------------------+--------------------------------------+--------------------------+
171 +---------------------------+--------------------------------------+--------------------------+
174 +---------------------------+--------------------------------------+--------------------------+
176 +---------------------------+--------------------------------------+--------------------------+
178 +---------------------------+--------------------------------------+--------------------------+
181 +---------------------------+--------------------------------------+--------------------------+
184 +---------------------------+--------------------------------------+--------------------------+
186 +---------------------------+--------------------------------------+--------------------------+
189 +---------------------------+--------------------------------------+--------------------------+
192 +---------------------------+--------------------------------------+--------------------------+
194 +---------------------------+--------------------------------------+--------------------------+
196 +---------------------------+--------------------------------------+--------------------------+
198 +---------------------------+--------------------------------------+--------------------------+
200 +---------------------------+--------------------------------------+--------------------------+
202 +---------------------------+--------------------------------------+--------------------------+
205 +---------------------------+--------------------------------------+--------------------------+
207 +---------------------------+--------------------------------------+--------------------------+
210 +---------------------------+--------------------------------------+--------------------------+
212 For example, to silently install a default, system-wide Python installation,
215 python-3.9.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
221 python-3.9.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
225 recommended for per-user installs when there is also a system-wide installation
234 .. code-block:: xml
244 .. _install-layout-option:
247 ------------------------------
251 need, all possible components may be downloaded on-demand to create a complete
258 required files. Remember to substitute ``python-3.9.0.exe`` for the actual
264 python-3.9.0.exe /layout [optional target directory]
269 --------------------
275 "Modify" allows you to add or remove features by modifying the checkboxes -
287 .. _windows-store:
311 example, as ``python3.exe`` and ``python3.x.exe`` as well as
318 Virtual environments can be created with ``python -m venv`` and activated
324 ``python3.exe`` or ``python3.x.exe``.
330 Python in Start and right-click to select Uninstall. Uninstalling will
335 ------------
343 Microsoft's documentation on packaged full-trust apps, currently available at
344 `docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
345 <https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes>`_
348 .. _windows-nuget:
356 continuous integration and build systems that do not have a system-wide
358 perfectly fine for packages containing build-time tools.
360 Visit `nuget.org <https://www.nuget.org/>`_ for the most up-to-date information
366 tool, the latest version of Python for 64-bit or 32-bit machines is installed
369 nuget.exe install python -ExcludeVersion -OutputDirectory .
370 nuget.exe install pythonx86 -ExcludeVersion -OutputDirectory .
372 To select a particular version, add a ``-Version 3.x.y``. The output directory
375 and without the ``-ExcludeVersion`` option this name will include the specific
379 # Without -ExcludeVersion
380 > .\python.3.5.2\tools\python.exe -V
383 # With -ExcludeVersion
384 > .\python\tools\python.exe -V
388 installed side-by-side and referenced using the full path. Alternatively,
399 for the 64-bit version and `www.nuget.org/packages/pythonx86
400 <https://www.nuget.org/packages/pythonx86>`_ for the 32-bit version.
403 .. _windows-embeddable:
412 directly accessed by end-users.
416 installed packages. The standard library is included as pre-compiled and
417 optimized ``.pyc`` files in a ZIP, and ``python3.dll``, ``python37.dll``,
424 <https://www.microsoft.com/en-us/download/details.aspx?id=48145>`_ and it is
430 Third-party packages should be installed by the application installer alongside
434 general, third-party packages should be treated as part of the application
441 ------------------
454 able to call ``Py_Main`` with a hard-coded command line.
458 command-line arguments. In this case, the application will appear to be Python
468 ----------------
473 either invoke ``python.exe`` or directly use ``python3.dll``. For either case,
491 Installer with multi-platform compatibility, documentation, PyWin32
502 Windows-specific distribution with prebuilt scientific packages and
516 reliable for a single, system-wide installation. If you regularly use multiple
520 .. _setting-envvars:
523 ---------------------------------------
531 .. code-block:: doscon
550 System variables, you need non-restricted access to your machine
565 https://www.microsoft.com/en-us/wdsi/help/folder-variables
568 https://technet.microsoft.com/en-us/library/cc754250.aspx
571 https://technet.microsoft.com/en-us/library/cc755104.aspx
574 … https://support.microsoft.com/en-us/help/310519/how-to-manage-environment-variables-in-windows-xp
580 .. _windows-path-mod:
583 -----------------------------
596 scripts with command line options, see :ref:`using-on-cmdline` documentation.
598 If you don't enable this option at install time, you can always re-run the
600 modify the :envvar:`PATH` using the directions in :ref:`setting-envvars`. You
608 .. _win-utf8-mode:
610 UTF-8 mode
619 This may cause issues because UTF-8 is widely used on the internet
622 You can use the :ref:`Python UTF-8 Mode <utf8-mode>` to change the default text
623 encoding to UTF-8. You can enable the :ref:`Python UTF-8 Mode <utf8-mode>` via
624 the ``-X utf8`` command line option, or the ``PYTHONUTF8=1`` environment
625 variable. See :envvar:`PYTHONUTF8` for enabling UTF-8 mode, and
626 :ref:`setting-envvars` for how to modify environment variables.
628 When the :ref:`Python UTF-8 Mode <utf8-mode>` is enabled, you can still use the
635 temporarily or use the ``-X utf8`` command line option.
638 Even when UTF-8 mode is disabled, Python uses UTF-8 by default
655 command-line) to indicate a preference for a specific Python version, and
659 appropriate version of Python. It will prefer per-user installations over
660 system-wide ones, and orders by language version rather than using the most
666 ---------------
668 From the command-line
673 System-wide installations of Python 3.3 and later will put the launcher on your
683 started - it can be exited as normal, and any additional command-line
687 will have noticed that Python |version| was started - to launch Python 2.7, try
692 py -2.7
699 py -2
710 Per-user installations of Python do not add the launcher to :envvar:`PATH`
720 the external ``virtualenv`` tool) active, the launcher will run the virtual
728 Let's create a test Python script - create a file called ``hello.py`` with the
731 .. code-block:: python
746 .. code-block:: python
748 #! python3
750 Re-executing the command should now print the latest Python 3.x information.
751 As with the above command-line examples, you can specify a more explicit
766 when you double-click on one of these files from Windows explorer the launcher
774 -------------
794 .. code-block:: sh
806 Furthermore the 32-bit version can be requested by adding "-32" after the
807 minor version. I.e. ``/usr/bin/python2.7-32`` will request usage of the
808 32-bit python 2.7.
812 Beginning with python launcher 3.7 it is possible to request 64-bit version
813 by the "-64" suffix. Furthermore it is possible to specify a major and
814 architecture without minor (i.e. ``/usr/bin/python3-64``).
822 --------------------------
827 .. code-block:: sh
829 #! /usr/bin/python -v
831 Then Python will be started with the ``-v`` option
834 -------------
839 Two .ini files will be searched by the launcher - ``py.ini`` in the current
857 if a 32 or 64 bit implementation shall be requested by adding "-32" or "-64".
860 ``#!python3`` has a version qualifier which specifies only a major version.
866 "3.7", "3.7-32" or "3.7-64". (Note that the "-64" option is only
877 On 64-bit Windows with both 32-bit and 64-bit implementations of the same
878 (major.minor) Python version installed, the 64-bit version will always be
879 preferred. This will be true for both 32-bit and 64-bit implementations of the
880 launcher - a 32-bit launcher will prefer to execute a 64-bit Python installation
884 whether a 32 or 64-bit version of Python and corresponding launcher was
885 installed last). As noted above, an optional "-32" or "-64" suffix can be
892 the command ``python3`` will use the latest Python 3.x installed.
894 * The commands ``python3.1`` and ``python2.7`` will not consult any
897 * If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use
900 * If ``PY_PYTHON=3.1-32``, the command ``python`` will use the 32-bit
901 implementation of 3.1 whereas the command ``python3`` will use the latest
906 ``python`` and ``python3`` will both use specifically 3.1
919 .. code-block:: ini
927 .. code-block:: ini
931 python3=3.1
934 -----------
940 particular version was chosen and the exact command-line used to execute the
950 Python usually stores its library (and thereby your site-packages folder) in the
953 :file:`C:\\Python\\Lib\\` and third-party modules should be stored in
954 :file:`C:\\Python\\Lib\\site-packages\\`.
979 :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
986 semicolon-delimited path strings as their default value will cause each path
993 the "Python Home". If a Python home is found, the relevant sub-directories
994 added to :data:`sys.path` (``Lib``, ``plat-win``, etc) are based on that
1000 relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
1032 * If you are loading :file:`python3.dll` or :file:`python37.dll` in your own
1045 These will ensure that the files in a system-wide installation will not take
1049 non-standard paths in the registry and user site-packages.
1074 The Windows-specific standard modules are documented in
1075 :ref:`mswin-specific-services`.
1078 -------
1081 is a collection of modules for advanced Windows-specific support. This includes
1085 <https://docs.microsoft.com/en-us/windows/desktop/com/component-object-model--com--portal>`_
1090 * `Microsoft Foundation Classes <https://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>…
1095 shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
1107 ---------
1109 `cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ is a :mod:`distutils`
1110 extension (see :ref:`extending-distutils`) which wraps Python scripts into
1117 ------
1120 Unix-like systems, there is a library exclusive to Windows as well: Windows
1124 Turbo-C's :file:`CONIO.H`, used to create text user interfaces.
1134 <https://devguide.python.org/setup/#getting-the-source-code>`_.
1143 For extension modules, consult :ref:`building-on-windows`.
1163 <ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
1168 for detailed information about platforms with pre-compiled installers.