index.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
  6. <meta property="og:title" content="Installing Python Modules" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/installing/index.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="Email, distutils-sig@python.org,. As a popular open source development project, Python has an active supporting community of contributors and users that also make their software available for other..." />
  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="Email, distutils-sig@python.org,. As a popular open source development project, Python has an active supporting community of contributors and users that also make their software available for other..." />
  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>Installing Python Modules &#8212; Python 3.12.0 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  19. <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?digest=b37c26da2f7529d09fe70b41c4b2133fe4931a90" />
  20. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css" />
  21. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  22. <script src="../_static/jquery.js"></script>
  23. <script src="../_static/underscore.js"></script>
  24. <script src="../_static/doctools.js"></script>
  25. <script src="../_static/sidebar.js"></script>
  26. <link rel="search" type="application/opensearchdescription+xml"
  27. title="Search within Python 3.12.0 documentation"
  28. href="../_static/opensearch.xml"/>
  29. <link rel="author" title="About these documents" href="../about.html" />
  30. <link rel="index" title="Index" href="../genindex.html" />
  31. <link rel="search" title="Search" href="../search.html" />
  32. <link rel="copyright" title="Copyright" href="../copyright.html" />
  33. <link rel="next" title="Python HOWTOs" href="../howto/index.html" />
  34. <link rel="prev" title="API and ABI Versioning" href="../c-api/apiabiversion.html" />
  35. <link rel="canonical" href="https://docs.python.org/3/installing/index.html" />
  36. <style>
  37. @media only screen {
  38. table.full-width-table {
  39. width: 100%;
  40. }
  41. }
  42. </style>
  43. <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  44. <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
  45. <script type="text/javascript" src="../_static/copybutton.js"></script>
  46. <script type="text/javascript" src="../_static/menu.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="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="#">Installing Python Modules</a><ul>
  86. <li><a class="reference internal" href="#key-terms">Key terms</a></li>
  87. <li><a class="reference internal" href="#basic-usage">Basic usage</a></li>
  88. <li><a class="reference internal" href="#how-do-i">How do I …?</a><ul>
  89. <li><a class="reference internal" href="#install-pip-in-versions-of-python-prior-to-python-3-4">… install <code class="docutils literal notranslate"><span class="pre">pip</span></code> in versions of Python prior to Python 3.4?</a></li>
  90. <li><a class="reference internal" href="#install-packages-just-for-the-current-user">… install packages just for the current user?</a></li>
  91. <li><a class="reference internal" href="#install-scientific-python-packages">… install scientific Python packages?</a></li>
  92. <li><a class="reference internal" href="#work-with-multiple-versions-of-python-installed-in-parallel">… work with multiple versions of Python installed in parallel?</a></li>
  93. </ul>
  94. </li>
  95. <li><a class="reference internal" href="#common-installation-issues">Common installation issues</a><ul>
  96. <li><a class="reference internal" href="#installing-into-the-system-python-on-linux">Installing into the system Python on Linux</a></li>
  97. <li><a class="reference internal" href="#pip-not-installed">Pip not installed</a></li>
  98. <li><a class="reference internal" href="#installing-binary-extensions">Installing binary extensions</a></li>
  99. </ul>
  100. </li>
  101. </ul>
  102. </li>
  103. </ul>
  104. </div>
  105. <div>
  106. <h4>Previous topic</h4>
  107. <p class="topless"><a href="../c-api/apiabiversion.html"
  108. title="previous chapter">API and ABI Versioning</a></p>
  109. </div>
  110. <div>
  111. <h4>Next topic</h4>
  112. <p class="topless"><a href="../howto/index.html"
  113. title="next chapter">Python HOWTOs</a></p>
  114. </div>
  115. <div role="note" aria-label="source link">
  116. <h3>This Page</h3>
  117. <ul class="this-page-menu">
  118. <li><a href="../bugs.html">Report a Bug</a></li>
  119. <li>
  120. <a href="https://github.com/python/cpython/blob/main/Doc/installing/index.rst"
  121. rel="nofollow">Show Source
  122. </a>
  123. </li>
  124. </ul>
  125. </div>
  126. </nav>
  127. </div>
  128. </div>
  129. <div class="related" role="navigation" aria-label="related navigation">
  130. <h3>Navigation</h3>
  131. <ul>
  132. <li class="right" style="margin-right: 10px">
  133. <a href="../genindex.html" title="General Index"
  134. accesskey="I">index</a></li>
  135. <li class="right" >
  136. <a href="../py-modindex.html" title="Python Module Index"
  137. >modules</a> |</li>
  138. <li class="right" >
  139. <a href="../howto/index.html" title="Python HOWTOs"
  140. accesskey="N">next</a> |</li>
  141. <li class="right" >
  142. <a href="../c-api/apiabiversion.html" title="API and ABI Versioning"
  143. accesskey="P">previous</a> |</li>
  144. <li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  145. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  146. <li class="switchers">
  147. <div class="language_switcher_placeholder"></div>
  148. <div class="version_switcher_placeholder"></div>
  149. </li>
  150. <li>
  151. </li>
  152. <li id="cpython-language-and-version">
  153. <a href="../index.html">3.12.0 Documentation</a> &#187;
  154. </li>
  155. <li class="nav-item nav-item-this"><a href="">Installing Python Modules</a></li>
  156. <li class="right">
  157. <div class="inline-search" role="search">
  158. <form class="inline-search" action="../search.html" method="get">
  159. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  160. <input type="submit" value="Go" />
  161. </form>
  162. </div>
  163. |
  164. </li>
  165. <li class="right">
  166. <label class="theme-selector-label">
  167. Theme
  168. <select class="theme-selector" oninput="activateTheme(this.value)">
  169. <option value="auto" selected>Auto</option>
  170. <option value="light">Light</option>
  171. <option value="dark">Dark</option>
  172. </select>
  173. </label> |</li>
  174. </ul>
  175. </div>
  176. <div class="document">
  177. <div class="documentwrapper">
  178. <div class="bodywrapper">
  179. <div class="body" role="main">
  180. <section id="installing-python-modules">
  181. <span id="installing-index"></span><h1>Installing Python Modules<a class="headerlink" href="#installing-python-modules" title="Permalink to this headline">¶</a></h1>
  182. <dl class="field-list simple">
  183. <dt class="field-odd">Email</dt>
  184. <dd class="field-odd"><p><a class="reference external" href="mailto:distutils-sig&#37;&#52;&#48;python&#46;org">distutils-sig<span>&#64;</span>python<span>&#46;</span>org</a></p>
  185. </dd>
  186. </dl>
  187. <p>As a popular open source development project, Python has an active
  188. supporting community of contributors and users that also make their software
  189. available for other Python developers to use under open source license terms.</p>
  190. <p>This allows Python users to share and collaborate effectively, benefiting
  191. from the solutions others have already created to common (and sometimes
  192. even rare!) problems, as well as potentially contributing their own
  193. solutions to the common pool.</p>
  194. <p>This guide covers the installation part of the process. For a guide to
  195. creating and sharing your own Python projects, refer to the
  196. <a class="reference external" href="https://packaging.python.org/en/latest/tutorials/packaging-projects/">Python packaging user guide</a>.</p>
  197. <div class="admonition note">
  198. <p class="admonition-title">Note</p>
  199. <p>For corporate and other institutional users, be aware that many
  200. organisations have their own policies around using and contributing to
  201. open source software. Please take such policies into account when making
  202. use of the distribution and installation tools provided with Python.</p>
  203. </div>
  204. <section id="key-terms">
  205. <h2>Key terms<a class="headerlink" href="#key-terms" title="Permalink to this headline">¶</a></h2>
  206. <ul class="simple">
  207. <li><p><code class="docutils literal notranslate"><span class="pre">pip</span></code> is the preferred installer program. Starting with Python 3.4, it
  208. is included by default with the Python binary installers.</p></li>
  209. <li><p>A <em>virtual environment</em> is a semi-isolated Python environment that allows
  210. packages to be installed for use by a particular application, rather than
  211. being installed system wide.</p></li>
  212. <li><p><code class="docutils literal notranslate"><span class="pre">venv</span></code> is the standard tool for creating virtual environments, and has
  213. been part of Python since Python 3.3. Starting with Python 3.4, it
  214. defaults to installing <code class="docutils literal notranslate"><span class="pre">pip</span></code> into all created virtual environments.</p></li>
  215. <li><p><code class="docutils literal notranslate"><span class="pre">virtualenv</span></code> is a third party alternative (and predecessor) to
  216. <code class="docutils literal notranslate"><span class="pre">venv</span></code>. It allows virtual environments to be used on versions of
  217. Python prior to 3.4, which either don’t provide <code class="docutils literal notranslate"><span class="pre">venv</span></code> at all, or
  218. aren’t able to automatically install <code class="docutils literal notranslate"><span class="pre">pip</span></code> into created environments.</p></li>
  219. <li><p>The <a class="reference external" href="https://pypi.org">Python Package Index</a> is a public
  220. repository of open source licensed packages made available for use by
  221. other Python users.</p></li>
  222. <li><p>the <a class="reference external" href="https://www.pypa.io/">Python Packaging Authority</a> is the group of
  223. developers and documentation authors responsible for the maintenance and
  224. evolution of the standard packaging tools and the associated metadata and
  225. file format standards. They maintain a variety of tools, documentation,
  226. and issue trackers on <a class="reference external" href="https://github.com/pypa">GitHub</a>.</p></li>
  227. <li><p><code class="docutils literal notranslate"><span class="pre">distutils</span></code> is the original build and distribution system first added to
  228. the Python standard library in 1998. While direct use of <code class="docutils literal notranslate"><span class="pre">distutils</span></code> is
  229. being phased out, it still laid the foundation for the current packaging
  230. and distribution infrastructure, and it not only remains part of the
  231. standard library, but its name lives on in other ways (such as the name
  232. of the mailing list used to coordinate Python packaging standards
  233. development).</p></li>
  234. </ul>
  235. <div class="versionchanged">
  236. <p><span class="versionmodified changed">Changed in version 3.5: </span>The use of <code class="docutils literal notranslate"><span class="pre">venv</span></code> is now recommended for creating virtual environments.</p>
  237. </div>
  238. <div class="admonition seealso">
  239. <p class="admonition-title">See also</p>
  240. <p><a class="reference external" href="https://packaging.python.org/installing/#creating-virtual-environments">Python Packaging User Guide: Creating and using virtual environments</a></p>
  241. </div>
  242. </section>
  243. <section id="basic-usage">
  244. <h2>Basic usage<a class="headerlink" href="#basic-usage" title="Permalink to this headline">¶</a></h2>
  245. <p>The standard packaging tools are all designed to be used from the command
  246. line.</p>
  247. <p>The following command will install the latest version of a module and its
  248. dependencies from the Python Package Index:</p>
  249. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python -m pip install SomePackage
  250. </pre></div>
  251. </div>
  252. <div class="admonition note">
  253. <p class="admonition-title">Note</p>
  254. <p>For POSIX users (including macOS and Linux users), the examples in
  255. this guide assume the use of a <a class="reference internal" href="../glossary.html#term-virtual-environment"><span class="xref std std-term">virtual environment</span></a>.</p>
  256. <p>For Windows users, the examples in this guide assume that the option to
  257. adjust the system PATH environment variable was selected when installing
  258. Python.</p>
  259. </div>
  260. <p>It’s also possible to specify an exact or minimum version directly on the
  261. command line. When using comparator operators such as <code class="docutils literal notranslate"><span class="pre">&gt;</span></code>, <code class="docutils literal notranslate"><span class="pre">&lt;</span></code> or some other
  262. special character which get interpreted by shell, the package name and the
  263. version should be enclosed within double quotes:</p>
  264. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python -m pip install SomePackage==1.0.4 # specific version
  265. python -m pip install &quot;SomePackage&gt;=1.0.4&quot; # minimum version
  266. </pre></div>
  267. </div>
  268. <p>Normally, if a suitable module is already installed, attempting to install
  269. it again will have no effect. Upgrading existing modules must be requested
  270. explicitly:</p>
  271. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python -m pip install --upgrade SomePackage
  272. </pre></div>
  273. </div>
  274. <p>More information and resources regarding <code class="docutils literal notranslate"><span class="pre">pip</span></code> and its capabilities can be
  275. found in the <a class="reference external" href="https://packaging.python.org">Python Packaging User Guide</a>.</p>
  276. <p>Creation of virtual environments is done through the <a class="reference internal" href="../library/venv.html#module-venv" title="venv: Creation of virtual environments."><code class="xref py py-mod docutils literal notranslate"><span class="pre">venv</span></code></a> module.
  277. Installing packages into an active virtual environment uses the commands shown
  278. above.</p>
  279. <div class="admonition seealso">
  280. <p class="admonition-title">See also</p>
  281. <p><a class="reference external" href="https://packaging.python.org/installing/">Python Packaging User Guide: Installing Python Distribution Packages</a></p>
  282. </div>
  283. </section>
  284. <section id="how-do-i">
  285. <h2>How do I …?<a class="headerlink" href="#how-do-i" title="Permalink to this headline">¶</a></h2>
  286. <p>These are quick answers or links for some common tasks.</p>
  287. <section id="install-pip-in-versions-of-python-prior-to-python-3-4">
  288. <h3>… install <code class="docutils literal notranslate"><span class="pre">pip</span></code> in versions of Python prior to Python 3.4?<a class="headerlink" href="#install-pip-in-versions-of-python-prior-to-python-3-4" title="Permalink to this headline">¶</a></h3>
  289. <p>Python only started bundling <code class="docutils literal notranslate"><span class="pre">pip</span></code> with Python 3.4. For earlier versions,
  290. <code class="docutils literal notranslate"><span class="pre">pip</span></code> needs to be “bootstrapped” as described in the Python Packaging
  291. User Guide.</p>
  292. <div class="admonition seealso">
  293. <p class="admonition-title">See also</p>
  294. <p><a class="reference external" href="https://packaging.python.org/installing/#requirements-for-installing-packages">Python Packaging User Guide: Requirements for Installing Packages</a></p>
  295. </div>
  296. </section>
  297. <section id="install-packages-just-for-the-current-user">
  298. <h3>… install packages just for the current user?<a class="headerlink" href="#install-packages-just-for-the-current-user" title="Permalink to this headline">¶</a></h3>
  299. <p>Passing the <code class="docutils literal notranslate"><span class="pre">--user</span></code> option to <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span></code> will install a
  300. package just for the current user, rather than for all users of the system.</p>
  301. </section>
  302. <section id="install-scientific-python-packages">
  303. <h3>… install scientific Python packages?<a class="headerlink" href="#install-scientific-python-packages" title="Permalink to this headline">¶</a></h3>
  304. <p>A number of scientific Python packages have complex binary dependencies, and
  305. aren’t currently easy to install using <code class="docutils literal notranslate"><span class="pre">pip</span></code> directly. At this point in
  306. time, it will often be easier for users to install these packages by
  307. <a class="reference external" href="https://packaging.python.org/science/">other means</a>
  308. rather than attempting to install them with <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
  309. <div class="admonition seealso">
  310. <p class="admonition-title">See also</p>
  311. <p><a class="reference external" href="https://packaging.python.org/science/">Python Packaging User Guide: Installing Scientific Packages</a></p>
  312. </div>
  313. </section>
  314. <section id="work-with-multiple-versions-of-python-installed-in-parallel">
  315. <h3>… work with multiple versions of Python installed in parallel?<a class="headerlink" href="#work-with-multiple-versions-of-python-installed-in-parallel" title="Permalink to this headline">¶</a></h3>
  316. <p>On Linux, macOS, and other POSIX systems, use the versioned Python commands
  317. in combination with the <code class="docutils literal notranslate"><span class="pre">-m</span></code> switch to run the appropriate copy of
  318. <code class="docutils literal notranslate"><span class="pre">pip</span></code>:</p>
  319. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python2 -m pip install SomePackage # default Python 2
  320. python2.7 -m pip install SomePackage # specifically Python 2.7
  321. python3 -m pip install SomePackage # default Python 3
  322. python3.4 -m pip install SomePackage # specifically Python 3.4
  323. </pre></div>
  324. </div>
  325. <p>Appropriately versioned <code class="docutils literal notranslate"><span class="pre">pip</span></code> commands may also be available.</p>
  326. <p>On Windows, use the <code class="docutils literal notranslate"><span class="pre">py</span></code> Python launcher in combination with the <code class="docutils literal notranslate"><span class="pre">-m</span></code>
  327. switch:</p>
  328. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>py -2 -m pip install SomePackage # default Python 2
  329. py -2.7 -m pip install SomePackage # specifically Python 2.7
  330. py -3 -m pip install SomePackage # default Python 3
  331. py -3.4 -m pip install SomePackage # specifically Python 3.4
  332. </pre></div>
  333. </div>
  334. </section>
  335. </section>
  336. <section id="common-installation-issues">
  337. <h2>Common installation issues<a class="headerlink" href="#common-installation-issues" title="Permalink to this headline">¶</a></h2>
  338. <section id="installing-into-the-system-python-on-linux">
  339. <h3>Installing into the system Python on Linux<a class="headerlink" href="#installing-into-the-system-python-on-linux" title="Permalink to this headline">¶</a></h3>
  340. <p>On Linux systems, a Python installation will typically be included as part
  341. of the distribution. Installing into this Python installation requires
  342. root access to the system, and may interfere with the operation of the
  343. system package manager and other components of the system if a component
  344. is unexpectedly upgraded using <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
  345. <p>On such systems, it is often better to use a virtual environment or a
  346. per-user installation when installing packages with <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
  347. </section>
  348. <section id="pip-not-installed">
  349. <h3>Pip not installed<a class="headerlink" href="#pip-not-installed" title="Permalink to this headline">¶</a></h3>
  350. <p>It is possible that <code class="docutils literal notranslate"><span class="pre">pip</span></code> does not get installed by default. One potential fix is:</p>
  351. <div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python -m ensurepip --default-pip
  352. </pre></div>
  353. </div>
  354. <p>There are also additional resources for <a class="reference external" href="https://packaging.python.org/en/latest/tutorials/installing-packages/#ensure-pip-setuptools-and-wheel-are-up-to-date">installing pip.</a></p>
  355. </section>
  356. <section id="installing-binary-extensions">
  357. <h3>Installing binary extensions<a class="headerlink" href="#installing-binary-extensions" title="Permalink to this headline">¶</a></h3>
  358. <p>Python has typically relied heavily on source based distribution, with end
  359. users being expected to compile extension modules from source as part of
  360. the installation process.</p>
  361. <p>With the introduction of support for the binary <code class="docutils literal notranslate"><span class="pre">wheel</span></code> format, and the
  362. ability to publish wheels for at least Windows and macOS through the
  363. Python Package Index, this problem is expected to diminish over time,
  364. as users are more regularly able to install pre-built extensions rather
  365. than needing to build them themselves.</p>
  366. <p>Some of the solutions for installing <a class="reference external" href="https://packaging.python.org/science/">scientific software</a>
  367. that are not yet available as pre-built <code class="docutils literal notranslate"><span class="pre">wheel</span></code> files may also help with
  368. obtaining other binary extensions without needing to build them locally.</p>
  369. <div class="admonition seealso">
  370. <p class="admonition-title">See also</p>
  371. <p><a class="reference external" href="https://packaging.python.org/extensions/">Python Packaging User Guide: Binary Extensions</a></p>
  372. </div>
  373. </section>
  374. </section>
  375. </section>
  376. <div class="clearer"></div>
  377. </div>
  378. </div>
  379. </div>
  380. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  381. <div class="sphinxsidebarwrapper">
  382. <div>
  383. <h3><a href="../contents.html">Table of Contents</a></h3>
  384. <ul>
  385. <li><a class="reference internal" href="#">Installing Python Modules</a><ul>
  386. <li><a class="reference internal" href="#key-terms">Key terms</a></li>
  387. <li><a class="reference internal" href="#basic-usage">Basic usage</a></li>
  388. <li><a class="reference internal" href="#how-do-i">How do I …?</a><ul>
  389. <li><a class="reference internal" href="#install-pip-in-versions-of-python-prior-to-python-3-4">… install <code class="docutils literal notranslate"><span class="pre">pip</span></code> in versions of Python prior to Python 3.4?</a></li>
  390. <li><a class="reference internal" href="#install-packages-just-for-the-current-user">… install packages just for the current user?</a></li>
  391. <li><a class="reference internal" href="#install-scientific-python-packages">… install scientific Python packages?</a></li>
  392. <li><a class="reference internal" href="#work-with-multiple-versions-of-python-installed-in-parallel">… work with multiple versions of Python installed in parallel?</a></li>
  393. </ul>
  394. </li>
  395. <li><a class="reference internal" href="#common-installation-issues">Common installation issues</a><ul>
  396. <li><a class="reference internal" href="#installing-into-the-system-python-on-linux">Installing into the system Python on Linux</a></li>
  397. <li><a class="reference internal" href="#pip-not-installed">Pip not installed</a></li>
  398. <li><a class="reference internal" href="#installing-binary-extensions">Installing binary extensions</a></li>
  399. </ul>
  400. </li>
  401. </ul>
  402. </li>
  403. </ul>
  404. </div>
  405. <div>
  406. <h4>Previous topic</h4>
  407. <p class="topless"><a href="../c-api/apiabiversion.html"
  408. title="previous chapter">API and ABI Versioning</a></p>
  409. </div>
  410. <div>
  411. <h4>Next topic</h4>
  412. <p class="topless"><a href="../howto/index.html"
  413. title="next chapter">Python HOWTOs</a></p>
  414. </div>
  415. <div role="note" aria-label="source link">
  416. <h3>This Page</h3>
  417. <ul class="this-page-menu">
  418. <li><a href="../bugs.html">Report a Bug</a></li>
  419. <li>
  420. <a href="https://github.com/python/cpython/blob/main/Doc/installing/index.rst"
  421. rel="nofollow">Show Source
  422. </a>
  423. </li>
  424. </ul>
  425. </div>
  426. </div>
  427. </div>
  428. <div class="clearer"></div>
  429. </div>
  430. <div class="related" role="navigation" aria-label="related navigation">
  431. <h3>Navigation</h3>
  432. <ul>
  433. <li class="right" style="margin-right: 10px">
  434. <a href="../genindex.html" title="General Index"
  435. >index</a></li>
  436. <li class="right" >
  437. <a href="../py-modindex.html" title="Python Module Index"
  438. >modules</a> |</li>
  439. <li class="right" >
  440. <a href="../howto/index.html" title="Python HOWTOs"
  441. >next</a> |</li>
  442. <li class="right" >
  443. <a href="../c-api/apiabiversion.html" title="API and ABI Versioning"
  444. >previous</a> |</li>
  445. <li><img src="../_static/py.svg" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  446. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  447. <li class="switchers">
  448. <div class="language_switcher_placeholder"></div>
  449. <div class="version_switcher_placeholder"></div>
  450. </li>
  451. <li>
  452. </li>
  453. <li id="cpython-language-and-version">
  454. <a href="../index.html">3.12.0 Documentation</a> &#187;
  455. </li>
  456. <li class="nav-item nav-item-this"><a href="">Installing Python Modules</a></li>
  457. <li class="right">
  458. <div class="inline-search" role="search">
  459. <form class="inline-search" action="../search.html" method="get">
  460. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  461. <input type="submit" value="Go" />
  462. </form>
  463. </div>
  464. |
  465. </li>
  466. <li class="right">
  467. <label class="theme-selector-label">
  468. Theme
  469. <select class="theme-selector" oninput="activateTheme(this.value)">
  470. <option value="auto" selected>Auto</option>
  471. <option value="light">Light</option>
  472. <option value="dark">Dark</option>
  473. </select>
  474. </label> |</li>
  475. </ul>
  476. </div>
  477. <div class="footer">
  478. &copy; <a href="../copyright.html">Copyright</a> 2001-2023, Python Software Foundation.
  479. <br />
  480. This page is licensed under the Python Software Foundation License Version 2.
  481. <br />
  482. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  483. <br />
  484. See <a href="/license.html">History and License</a> for more information.<br />
  485. <br />
  486. The Python Software Foundation is a non-profit corporation.
  487. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  488. <br />
  489. <br />
  490. Last updated on Oct 02, 2023.
  491. <a href="/bugs.html">Found a bug</a>?
  492. <br />
  493. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
  494. </div>
  495. </body>
  496. </html>