gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

454 lines
27KB

  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <meta property="og:title" content="ensurepip — Bootstrapping the pip installer" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/library/ensurepip.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="Source code: Lib/ensurepip The ensurepip package provides support for bootstrapping the pip installer into an existing Python installation or virtual environment. This bootstrapping approach reflec..." />
  11. <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
  12. <meta property="og:image:alt" content="Python documentation" />
  13. <meta name="description" content="Source code: Lib/ensurepip The ensurepip package provides support for bootstrapping the pip installer into an existing Python installation or virtual environment. This bootstrapping approach reflec..." />
  14. <meta property="og:image:width" content="200" />
  15. <meta property="og:image:height" content="200" />
  16. <meta name="theme-color" content="#3776ab" />
  17. <title>ensurepip — Bootstrapping the pip installer &#8212; Python 3.12.3 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
  19. <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=bb723527" />
  20. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=b20cc3f5" />
  21. <script src="../_static/documentation_options.js?v=2c828074"></script>
  22. <script src="../_static/doctools.js?v=888ff710"></script>
  23. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  24. <script src="../_static/sidebar.js"></script>
  25. <link rel="search" type="application/opensearchdescription+xml"
  26. title="Search within Python 3.12.3 documentation"
  27. href="../_static/opensearch.xml"/>
  28. <link rel="author" title="About these documents" href="../about.html" />
  29. <link rel="index" title="Index" href="../genindex.html" />
  30. <link rel="search" title="Search" href="../search.html" />
  31. <link rel="copyright" title="Copyright" href="../copyright.html" />
  32. <link rel="next" title="venv — Creation of virtual environments" href="venv.html" />
  33. <link rel="prev" title="Software Packaging and Distribution" href="distribution.html" />
  34. <link rel="canonical" href="https://docs.python.org/3/library/ensurepip.html" />
  35. <style>
  36. @media only screen {
  37. table.full-width-table {
  38. width: 100%;
  39. }
  40. }
  41. </style>
  42. <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  43. <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
  44. <script type="text/javascript" src="../_static/copybutton.js"></script>
  45. <script type="text/javascript" src="../_static/menu.js"></script>
  46. <script type="text/javascript" src="../_static/search-focus.js"></script>
  47. <script type="text/javascript" src="../_static/themetoggle.js"></script>
  48. </head>
  49. <body>
  50. <div class="mobile-nav">
  51. <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
  52. aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
  53. <nav class="nav-content" role="navigation">
  54. <label for="menuToggler" class="toggler__label">
  55. <span></span>
  56. </label>
  57. <span class="nav-items-wrapper">
  58. <a href="https://www.python.org/" class="nav-logo">
  59. <img src="../_static/py.svg" alt="Python logo"/>
  60. </a>
  61. <span class="version_switcher_placeholder"></span>
  62. <form role="search" class="search" action="../search.html" method="get">
  63. <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
  64. <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
  65. </svg>
  66. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  67. <input type="submit" value="Go"/>
  68. </form>
  69. </span>
  70. </nav>
  71. <div class="menu-wrapper">
  72. <nav class="menu" role="navigation" aria-label="main navigation">
  73. <div class="language_switcher_placeholder"></div>
  74. <label class="theme-selector-label">
  75. Theme
  76. <select class="theme-selector" oninput="activateTheme(this.value)">
  77. <option value="auto" selected>Auto</option>
  78. <option value="light">Light</option>
  79. <option value="dark">Dark</option>
  80. </select>
  81. </label>
  82. <div>
  83. <h3><a href="../contents.html">Table of Contents</a></h3>
  84. <ul>
  85. <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code> — Bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer</a><ul>
  86. <li><a class="reference internal" href="#command-line-interface">Command line interface</a></li>
  87. <li><a class="reference internal" href="#module-api">Module API</a></li>
  88. </ul>
  89. </li>
  90. </ul>
  91. </div>
  92. <div>
  93. <h4>Previous topic</h4>
  94. <p class="topless"><a href="distribution.html"
  95. title="previous chapter">Software Packaging and Distribution</a></p>
  96. </div>
  97. <div>
  98. <h4>Next topic</h4>
  99. <p class="topless"><a href="venv.html"
  100. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">venv</span></code> — Creation of virtual environments</a></p>
  101. </div>
  102. <div role="note" aria-label="source link">
  103. <h3>This Page</h3>
  104. <ul class="this-page-menu">
  105. <li><a href="../bugs.html">Report a Bug</a></li>
  106. <li>
  107. <a href="https://github.com/python/cpython/blob/main/Doc/library/ensurepip.rst"
  108. rel="nofollow">Show Source
  109. </a>
  110. </li>
  111. </ul>
  112. </div>
  113. </nav>
  114. </div>
  115. </div>
  116. <div class="related" role="navigation" aria-label="related navigation">
  117. <h3>Navigation</h3>
  118. <ul>
  119. <li class="right" style="margin-right: 10px">
  120. <a href="../genindex.html" title="General Index"
  121. accesskey="I">index</a></li>
  122. <li class="right" >
  123. <a href="../py-modindex.html" title="Python Module Index"
  124. >modules</a> |</li>
  125. <li class="right" >
  126. <a href="venv.html" title="venv — Creation of virtual environments"
  127. accesskey="N">next</a> |</li>
  128. <li class="right" >
  129. <a href="distribution.html" title="Software Packaging and Distribution"
  130. accesskey="P">previous</a> |</li>
  131. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  132. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  133. <li class="switchers">
  134. <div class="language_switcher_placeholder"></div>
  135. <div class="version_switcher_placeholder"></div>
  136. </li>
  137. <li>
  138. </li>
  139. <li id="cpython-language-and-version">
  140. <a href="../index.html">3.12.3 Documentation</a> &#187;
  141. </li>
  142. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  143. <li class="nav-item nav-item-2"><a href="distribution.html" accesskey="U">Software Packaging and Distribution</a> &#187;</li>
  144. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code> — Bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer</a></li>
  145. <li class="right">
  146. <div class="inline-search" role="search">
  147. <form class="inline-search" action="../search.html" method="get">
  148. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  149. <input type="submit" value="Go" />
  150. </form>
  151. </div>
  152. |
  153. </li>
  154. <li class="right">
  155. <label class="theme-selector-label">
  156. Theme
  157. <select class="theme-selector" oninput="activateTheme(this.value)">
  158. <option value="auto" selected>Auto</option>
  159. <option value="light">Light</option>
  160. <option value="dark">Dark</option>
  161. </select>
  162. </label> |</li>
  163. </ul>
  164. </div>
  165. <div class="document">
  166. <div class="documentwrapper">
  167. <div class="bodywrapper">
  168. <div class="body" role="main">
  169. <section id="module-ensurepip">
  170. <span id="ensurepip-bootstrapping-the-pip-installer"></span><h1><a class="reference internal" href="#module-ensurepip" title="ensurepip: Bootstrapping the &quot;pip&quot; installer into an existing Python installation or virtual environment."><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code></a> — Bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer<a class="headerlink" href="#module-ensurepip" title="Link to this heading">¶</a></h1>
  171. <div class="versionadded">
  172. <p><span class="versionmodified added">New in version 3.4.</span></p>
  173. </div>
  174. <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/ensurepip">Lib/ensurepip</a></p>
  175. <hr class="docutils" />
  176. <p>The <a class="reference internal" href="#module-ensurepip" title="ensurepip: Bootstrapping the &quot;pip&quot; installer into an existing Python installation or virtual environment."><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code></a> package provides support for bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code>
  177. installer into an existing Python installation or virtual environment. This
  178. bootstrapping approach reflects the fact that <code class="docutils literal notranslate"><span class="pre">pip</span></code> is an independent
  179. project with its own release cycle, and the latest available stable version
  180. is bundled with maintenance and feature releases of the CPython reference
  181. interpreter.</p>
  182. <p>In most cases, end users of Python shouldn’t need to invoke this module
  183. directly (as <code class="docutils literal notranslate"><span class="pre">pip</span></code> should be bootstrapped by default), but it may be
  184. needed if installing <code class="docutils literal notranslate"><span class="pre">pip</span></code> was skipped when installing Python (or
  185. when creating a virtual environment) or after explicitly uninstalling
  186. <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
  187. <div class="admonition note">
  188. <p class="admonition-title">Note</p>
  189. <p>This module <em>does not</em> access the internet. All of the components
  190. needed to bootstrap <code class="docutils literal notranslate"><span class="pre">pip</span></code> are included as internal parts of the
  191. package.</p>
  192. </div>
  193. <div class="admonition seealso">
  194. <p class="admonition-title">See also</p>
  195. <dl class="simple">
  196. <dt><a class="reference internal" href="../installing/index.html#installing-index"><span class="std std-ref">Installing Python Modules</span></a></dt><dd><p>The end user guide for installing Python packages</p>
  197. </dd>
  198. <dt><span class="target" id="index-0"></span><a class="pep reference external" href="https://peps.python.org/pep-0453/"><strong>PEP 453</strong></a>: Explicit bootstrapping of pip in Python installations</dt><dd><p>The original rationale and specification for this module.</p>
  199. </dd>
  200. </dl>
  201. </div>
  202. <div class="availability docutils container">
  203. <p><a class="reference internal" href="intro.html#availability"><span class="std std-ref">Availability</span></a>: not Emscripten, not WASI.</p>
  204. <p>This module does not work or is not available on WebAssembly platforms
  205. <code class="docutils literal notranslate"><span class="pre">wasm32-emscripten</span></code> and <code class="docutils literal notranslate"><span class="pre">wasm32-wasi</span></code>. See
  206. <a class="reference internal" href="intro.html#wasm-availability"><span class="std std-ref">WebAssembly platforms</span></a> for more information.</p>
  207. </div>
  208. <section id="command-line-interface">
  209. <h2>Command line interface<a class="headerlink" href="#command-line-interface" title="Link to this heading">¶</a></h2>
  210. <p>The command line interface is invoked using the interpreter’s <code class="docutils literal notranslate"><span class="pre">-m</span></code> switch.</p>
  211. <p>The simplest possible invocation is:</p>
  212. <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">ensurepip</span>
  213. </pre></div>
  214. </div>
  215. <p>This invocation will install <code class="docutils literal notranslate"><span class="pre">pip</span></code> if it is not already installed,
  216. but otherwise does nothing. To ensure the installed version of <code class="docutils literal notranslate"><span class="pre">pip</span></code>
  217. is at least as recent as the one available in <code class="docutils literal notranslate"><span class="pre">ensurepip</span></code>, pass the
  218. <code class="docutils literal notranslate"><span class="pre">--upgrade</span></code> option:</p>
  219. <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">ensurepip</span> <span class="o">--</span><span class="n">upgrade</span>
  220. </pre></div>
  221. </div>
  222. <p>By default, <code class="docutils literal notranslate"><span class="pre">pip</span></code> is installed into the current virtual environment
  223. (if one is active) or into the system site packages (if there is no
  224. active virtual environment). The installation location can be controlled
  225. through two additional command line options:</p>
  226. <ul class="simple">
  227. <li><p><code class="samp docutils literal notranslate"><span class="pre">--root</span> <em><span class="pre">dir</span></em></code>: Installs <code class="docutils literal notranslate"><span class="pre">pip</span></code> relative to the given root directory
  228. rather than the root of the currently active virtual environment (if any)
  229. or the default root for the current Python installation.</p></li>
  230. <li><p><code class="docutils literal notranslate"><span class="pre">--user</span></code>: Installs <code class="docutils literal notranslate"><span class="pre">pip</span></code> into the user site packages directory rather
  231. than globally for the current Python installation (this option is not
  232. permitted inside an active virtual environment).</p></li>
  233. </ul>
  234. <p>By default, the scripts <code class="docutils literal notranslate"><span class="pre">pipX</span></code> and <code class="docutils literal notranslate"><span class="pre">pipX.Y</span></code> will be installed (where
  235. X.Y stands for the version of Python used to invoke <code class="docutils literal notranslate"><span class="pre">ensurepip</span></code>). The
  236. scripts installed can be controlled through two additional command line
  237. options:</p>
  238. <ul class="simple">
  239. <li><p><code class="docutils literal notranslate"><span class="pre">--altinstall</span></code>: if an alternate installation is requested, the <code class="docutils literal notranslate"><span class="pre">pipX</span></code>
  240. script will <em>not</em> be installed.</p></li>
  241. <li><p><code class="docutils literal notranslate"><span class="pre">--default-pip</span></code>: if a “default pip” installation is requested, the
  242. <code class="docutils literal notranslate"><span class="pre">pip</span></code> script will be installed in addition to the two regular scripts.</p></li>
  243. </ul>
  244. <p>Providing both of the script selection options will trigger an exception.</p>
  245. </section>
  246. <section id="module-api">
  247. <h2>Module API<a class="headerlink" href="#module-api" title="Link to this heading">¶</a></h2>
  248. <p><a class="reference internal" href="#module-ensurepip" title="ensurepip: Bootstrapping the &quot;pip&quot; installer into an existing Python installation or virtual environment."><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code></a> exposes two functions for programmatic use:</p>
  249. <dl class="py function">
  250. <dt class="sig sig-object py" id="ensurepip.version">
  251. <span class="sig-prename descclassname"><span class="pre">ensurepip.</span></span><span class="sig-name descname"><span class="pre">version</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#ensurepip.version" title="Link to this definition">¶</a></dt>
  252. <dd><p>Returns a string specifying the available version of pip that will be
  253. installed when bootstrapping an environment.</p>
  254. </dd></dl>
  255. <dl class="py function">
  256. <dt class="sig sig-object py" id="ensurepip.bootstrap">
  257. <span class="sig-prename descclassname"><span class="pre">ensurepip.</span></span><span class="sig-name descname"><span class="pre">bootstrap</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">root</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">upgrade</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">user</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">altinstall</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">default_pip</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbosity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#ensurepip.bootstrap" title="Link to this definition">¶</a></dt>
  258. <dd><p>Bootstraps <code class="docutils literal notranslate"><span class="pre">pip</span></code> into the current or designated environment.</p>
  259. <p><em>root</em> specifies an alternative root directory to install relative to.
  260. If <em>root</em> is <code class="docutils literal notranslate"><span class="pre">None</span></code>, then installation uses the default install location
  261. for the current environment.</p>
  262. <p><em>upgrade</em> indicates whether or not to upgrade an existing installation
  263. of an earlier version of <code class="docutils literal notranslate"><span class="pre">pip</span></code> to the available version.</p>
  264. <p><em>user</em> indicates whether to use the user scheme rather than installing
  265. globally.</p>
  266. <p>By default, the scripts <code class="docutils literal notranslate"><span class="pre">pipX</span></code> and <code class="docutils literal notranslate"><span class="pre">pipX.Y</span></code> will be installed (where
  267. X.Y stands for the current version of Python).</p>
  268. <p>If <em>altinstall</em> is set, then <code class="docutils literal notranslate"><span class="pre">pipX</span></code> will <em>not</em> be installed.</p>
  269. <p>If <em>default_pip</em> is set, then <code class="docutils literal notranslate"><span class="pre">pip</span></code> will be installed in addition to
  270. the two regular scripts.</p>
  271. <p>Setting both <em>altinstall</em> and <em>default_pip</em> will trigger
  272. <a class="reference internal" href="exceptions.html#ValueError" title="ValueError"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a>.</p>
  273. <p><em>verbosity</em> controls the level of output to <a class="reference internal" href="sys.html#sys.stdout" title="sys.stdout"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.stdout</span></code></a> from the
  274. bootstrapping operation.</p>
  275. <p class="audit-hook">Raises an <a class="reference internal" href="sys.html#auditing"><span class="std std-ref">auditing event</span></a> <code class="docutils literal notranslate"><span class="pre">ensurepip.bootstrap</span></code> with argument <code class="docutils literal notranslate"><span class="pre">root</span></code>.</p>
  276. <div class="admonition note">
  277. <p class="admonition-title">Note</p>
  278. <p>The bootstrapping process has side effects on both <code class="docutils literal notranslate"><span class="pre">sys.path</span></code> and
  279. <code class="docutils literal notranslate"><span class="pre">os.environ</span></code>. Invoking the command line interface in a subprocess
  280. instead allows these side effects to be avoided.</p>
  281. </div>
  282. <div class="admonition note">
  283. <p class="admonition-title">Note</p>
  284. <p>The bootstrapping process may install additional modules required by
  285. <code class="docutils literal notranslate"><span class="pre">pip</span></code>, but other software should not assume those dependencies will
  286. always be present by default (as the dependencies may be removed in a
  287. future version of <code class="docutils literal notranslate"><span class="pre">pip</span></code>).</p>
  288. </div>
  289. </dd></dl>
  290. </section>
  291. </section>
  292. <div class="clearer"></div>
  293. </div>
  294. </div>
  295. </div>
  296. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  297. <div class="sphinxsidebarwrapper">
  298. <div>
  299. <h3><a href="../contents.html">Table of Contents</a></h3>
  300. <ul>
  301. <li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code> — Bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer</a><ul>
  302. <li><a class="reference internal" href="#command-line-interface">Command line interface</a></li>
  303. <li><a class="reference internal" href="#module-api">Module API</a></li>
  304. </ul>
  305. </li>
  306. </ul>
  307. </div>
  308. <div>
  309. <h4>Previous topic</h4>
  310. <p class="topless"><a href="distribution.html"
  311. title="previous chapter">Software Packaging and Distribution</a></p>
  312. </div>
  313. <div>
  314. <h4>Next topic</h4>
  315. <p class="topless"><a href="venv.html"
  316. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">venv</span></code> — Creation of virtual environments</a></p>
  317. </div>
  318. <div role="note" aria-label="source link">
  319. <h3>This Page</h3>
  320. <ul class="this-page-menu">
  321. <li><a href="../bugs.html">Report a Bug</a></li>
  322. <li>
  323. <a href="https://github.com/python/cpython/blob/main/Doc/library/ensurepip.rst"
  324. rel="nofollow">Show Source
  325. </a>
  326. </li>
  327. </ul>
  328. </div>
  329. </div>
  330. <div id="sidebarbutton" title="Collapse sidebar">
  331. <span>«</span>
  332. </div>
  333. </div>
  334. <div class="clearer"></div>
  335. </div>
  336. <div class="related" role="navigation" aria-label="related navigation">
  337. <h3>Navigation</h3>
  338. <ul>
  339. <li class="right" style="margin-right: 10px">
  340. <a href="../genindex.html" title="General Index"
  341. >index</a></li>
  342. <li class="right" >
  343. <a href="../py-modindex.html" title="Python Module Index"
  344. >modules</a> |</li>
  345. <li class="right" >
  346. <a href="venv.html" title="venv — Creation of virtual environments"
  347. >next</a> |</li>
  348. <li class="right" >
  349. <a href="distribution.html" title="Software Packaging and Distribution"
  350. >previous</a> |</li>
  351. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  352. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  353. <li class="switchers">
  354. <div class="language_switcher_placeholder"></div>
  355. <div class="version_switcher_placeholder"></div>
  356. </li>
  357. <li>
  358. </li>
  359. <li id="cpython-language-and-version">
  360. <a href="../index.html">3.12.3 Documentation</a> &#187;
  361. </li>
  362. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  363. <li class="nav-item nav-item-2"><a href="distribution.html" >Software Packaging and Distribution</a> &#187;</li>
  364. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">ensurepip</span></code> — Bootstrapping the <code class="docutils literal notranslate"><span class="pre">pip</span></code> installer</a></li>
  365. <li class="right">
  366. <div class="inline-search" role="search">
  367. <form class="inline-search" action="../search.html" method="get">
  368. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  369. <input type="submit" value="Go" />
  370. </form>
  371. </div>
  372. |
  373. </li>
  374. <li class="right">
  375. <label class="theme-selector-label">
  376. Theme
  377. <select class="theme-selector" oninput="activateTheme(this.value)">
  378. <option value="auto" selected>Auto</option>
  379. <option value="light">Light</option>
  380. <option value="dark">Dark</option>
  381. </select>
  382. </label> |</li>
  383. </ul>
  384. </div>
  385. <div class="footer">
  386. &copy;
  387. <a href="../copyright.html">
  388. Copyright
  389. </a>
  390. 2001-2024, Python Software Foundation.
  391. <br />
  392. This page is licensed under the Python Software Foundation License Version 2.
  393. <br />
  394. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  395. <br />
  396. See <a href="/license.html">History and License</a> for more information.<br />
  397. <br />
  398. The Python Software Foundation is a non-profit corporation.
  399. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  400. <br />
  401. <br />
  402. Last updated on Apr 09, 2024 (13:47 UTC).
  403. <a href="/bugs.html">Found a bug</a>?
  404. <br />
  405. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  406. </div>
  407. </body>
  408. </html>
上海开阖软件有限公司 沪ICP备12045867号-1