• Home
  • Raw
  • Download

Lines Matching +full:shebang +full:- +full:command

1 :mod:`venv` --- Creation of virtual environments
16 --------------
18 .. _venv-def:
19 .. _venv-intro:
38 …<https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-vir…
40 .. include:: ../includes/wasm-notavail.rst
43 -----------------------------
45 .. include:: /using/venv-create.inc
47 .. _venv-explanation:
50 --------------
66 The invocation of the activation script is platform-specific
70 +-------------+------------+--------------------------------------------------+
71 | Platform | Shell | Command to activate virtual environment |
74 | +------------+--------------------------------------------------+
76 | +------------+--------------------------------------------------+
78 | +------------+--------------------------------------------------+
80 +-------------+------------+--------------------------------------------------+
82 | +------------+--------------------------------------------------+
84 +-------------+------------+--------------------------------------------------+
100 a "shebang" line which points to the environment's Python interpreter,
101 i.e. :samp:`#!/{<path-to-venv>}/bin/python`.
103 value of :envvar:`!PATH`. On Windows, "shebang" line processing is supported if
104 you have the :ref:`launcher` installed. Thus, double-clicking an installed
115 environment to be activated, their shebang lines contain the absolute paths
117 inherently non-portable, in the general case. You should always have a
119 requirements file ``requirements.txt``, you can invoke ``pip install -r
129 The exact mechanism is platform-specific and is an internal implementation
133 .. _venv-api:
136 ---
140 The high-level method described above makes use of a simple API which provides
141 mechanisms for third-party virtual environment creators to customize environment
151 * ``system_site_packages`` -- a Boolean value indicating that the system Python
152 site-packages should be available to the environment (defaults to ``False``).
154 * ``clear`` -- a Boolean value which, if true, will delete the contents of
157 * ``symlinks`` -- a Boolean value indicating whether to attempt to symlink the
160 * ``upgrade`` -- a Boolean value which, if true, will upgrade an existing
161 environment with the running Python - for use when that Python has been
162 upgraded in-place (defaults to ``False``).
164 * ``with_pip`` -- a Boolean value which, if true, ensures pip is
166 the ``--default-pip`` option.
168 * ``prompt`` -- a String to be used after virtual environment is activated
173 * ``upgrade_deps`` -- Update the base venv modules to the latest on PyPI
184 Creators of third-party virtual environment tools will be free to use the
187 The returned env-builder is an object which has a method, ``create``:
228 * ``env_dir`` - The location of the virtual environment. Used for
231 * ``env_name`` - The name of the virtual environment. Used for
234 * ``prompt`` - The prompt to be used by the activation scripts. Used for
237 * ``executable`` - The underlying Python executable used by the virtual
241 * ``inc_path`` - The include path for the virtual environment.
243 * ``lib_path`` - The purelib path for the virtual environment.
245 * ``bin_path`` - The script path for the virtual environment.
247 * ``bin_name`` - The name of the script path relative to the virtual
251 * ``env_exe`` - The name of the Python interpreter in the virtual
255 * ``env_exec_cmd`` - The name of the Python interpreter, taking into
296 implementations to pre-install packages in the virtual environment or
297 perform other post-creation steps.
339 There is also a module-level convenience function:
360 --------------------------------------
407 Set up any packages which need to be pre-installed into the
436 sys.stderr.write(s.decode('utf-8'))
442 fn = os.path.split(path)[-1]
471 # Clean up - no longer needed
484 pred = lambda o: o.startswith('setuptools-') and o.endswith('.tar.gz')
497 url = 'https://bootstrap.pypa.io/get-pip.py'
520 parser.add_argument('--no-setuptools', default=False,
524 parser.add_argument('--no-pip', default=False,
528 parser.add_argument('--system-site-packages', default=False,
531 'system site-packages dir.')
536 parser.add_argument('--symlinks', default=use_symlinks,
541 parser.add_argument('--clear', default=False, action='store_true',
547 parser.add_argument('--upgrade', default=False, action='store_true',
553 'in-place.')
554 parser.add_argument('--verbose', default=False, action='store_true',
560 raise ValueError('you cannot supply --upgrade and --clear together.')