gooderp18绿色标准版
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

512 líneas
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="2. Using Python on Unix platforms" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/using/unix.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="Getting and installing the latest version of Python: On Linux: Python comes preinstalled on most Linux distributions, and is available as a package on all others. However there are certain features..." />
  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="Getting and installing the latest version of Python: On Linux: Python comes preinstalled on most Linux distributions, and is available as a package on all others. However there are certain features..." />
  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>2. Using Python on Unix platforms &#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="3. Configure Python" href="configure.html" />
  33. <link rel="prev" title="1. Command line and environment" href="cmdline.html" />
  34. <link rel="canonical" href="https://docs.python.org/3/using/unix.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="#">2. Using Python on Unix platforms</a><ul>
  86. <li><a class="reference internal" href="#getting-and-installing-the-latest-version-of-python">2.1. Getting and installing the latest version of Python</a><ul>
  87. <li><a class="reference internal" href="#on-linux">2.1.1. On Linux</a></li>
  88. <li><a class="reference internal" href="#on-freebsd-and-openbsd">2.1.2. On FreeBSD and OpenBSD</a></li>
  89. </ul>
  90. </li>
  91. <li><a class="reference internal" href="#building-python">2.2. Building Python</a></li>
  92. <li><a class="reference internal" href="#python-related-paths-and-files">2.3. Python-related paths and files</a></li>
  93. <li><a class="reference internal" href="#miscellaneous">2.4. Miscellaneous</a></li>
  94. <li><a class="reference internal" href="#custom-openssl">2.5. Custom OpenSSL</a></li>
  95. </ul>
  96. </li>
  97. </ul>
  98. </div>
  99. <div>
  100. <h4>Previous topic</h4>
  101. <p class="topless"><a href="cmdline.html"
  102. title="previous chapter"><span class="section-number">1. </span>Command line and environment</a></p>
  103. </div>
  104. <div>
  105. <h4>Next topic</h4>
  106. <p class="topless"><a href="configure.html"
  107. title="next chapter"><span class="section-number">3. </span>Configure Python</a></p>
  108. </div>
  109. <div role="note" aria-label="source link">
  110. <h3>This Page</h3>
  111. <ul class="this-page-menu">
  112. <li><a href="../bugs.html">Report a Bug</a></li>
  113. <li>
  114. <a href="https://github.com/python/cpython/blob/main/Doc/using/unix.rst"
  115. rel="nofollow">Show Source
  116. </a>
  117. </li>
  118. </ul>
  119. </div>
  120. </nav>
  121. </div>
  122. </div>
  123. <div class="related" role="navigation" aria-label="related navigation">
  124. <h3>Navigation</h3>
  125. <ul>
  126. <li class="right" style="margin-right: 10px">
  127. <a href="../genindex.html" title="General Index"
  128. accesskey="I">index</a></li>
  129. <li class="right" >
  130. <a href="../py-modindex.html" title="Python Module Index"
  131. >modules</a> |</li>
  132. <li class="right" >
  133. <a href="configure.html" title="3. Configure Python"
  134. accesskey="N">next</a> |</li>
  135. <li class="right" >
  136. <a href="cmdline.html" title="1. Command line and environment"
  137. accesskey="P">previous</a> |</li>
  138. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  139. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  140. <li class="switchers">
  141. <div class="language_switcher_placeholder"></div>
  142. <div class="version_switcher_placeholder"></div>
  143. </li>
  144. <li>
  145. </li>
  146. <li id="cpython-language-and-version">
  147. <a href="../index.html">3.12.3 Documentation</a> &#187;
  148. </li>
  149. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python Setup and Usage</a> &#187;</li>
  150. <li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Using Python on Unix platforms</a></li>
  151. <li class="right">
  152. <div class="inline-search" role="search">
  153. <form class="inline-search" action="../search.html" method="get">
  154. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  155. <input type="submit" value="Go" />
  156. </form>
  157. </div>
  158. |
  159. </li>
  160. <li class="right">
  161. <label class="theme-selector-label">
  162. Theme
  163. <select class="theme-selector" oninput="activateTheme(this.value)">
  164. <option value="auto" selected>Auto</option>
  165. <option value="light">Light</option>
  166. <option value="dark">Dark</option>
  167. </select>
  168. </label> |</li>
  169. </ul>
  170. </div>
  171. <div class="document">
  172. <div class="documentwrapper">
  173. <div class="bodywrapper">
  174. <div class="body" role="main">
  175. <section id="using-python-on-unix-platforms">
  176. <span id="using-on-unix"></span><h1><span class="section-number">2. </span>Using Python on Unix platforms<a class="headerlink" href="#using-python-on-unix-platforms" title="Link to this heading">¶</a></h1>
  177. <section id="getting-and-installing-the-latest-version-of-python">
  178. <h2><span class="section-number">2.1. </span>Getting and installing the latest version of Python<a class="headerlink" href="#getting-and-installing-the-latest-version-of-python" title="Link to this heading">¶</a></h2>
  179. <section id="on-linux">
  180. <h3><span class="section-number">2.1.1. </span>On Linux<a class="headerlink" href="#on-linux" title="Link to this heading">¶</a></h3>
  181. <p>Python comes preinstalled on most Linux distributions, and is available as a
  182. package on all others. However there are certain features you might want to use
  183. that are not available on your distro’s package. You can easily compile the
  184. latest version of Python from source.</p>
  185. <p>In the event that Python doesn’t come preinstalled and isn’t in the repositories as
  186. well, you can easily make packages for your own distro. Have a look at the
  187. following links:</p>
  188. <div class="admonition seealso">
  189. <p class="admonition-title">See also</p>
  190. <dl class="simple">
  191. <dt><a class="reference external" href="https://www.debian.org/doc/manuals/maint-guide/first.en.html">https://www.debian.org/doc/manuals/maint-guide/first.en.html</a></dt><dd><p>for Debian users</p>
  192. </dd>
  193. <dt><a class="reference external" href="https://en.opensuse.org/Portal:Packaging">https://en.opensuse.org/Portal:Packaging</a></dt><dd><p>for OpenSuse users</p>
  194. </dd>
  195. <dt><a class="reference external" href="https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutorial_GNU_Hello/">https://docs.fedoraproject.org/en-US/package-maintainers/Packaging_Tutorial_GNU_Hello/</a></dt><dd><p>for Fedora users</p>
  196. </dd>
  197. <dt><a class="reference external" href="https://slackbook.org/html/package-management-making-packages.html">https://slackbook.org/html/package-management-making-packages.html</a></dt><dd><p>for Slackware users</p>
  198. </dd>
  199. </dl>
  200. </div>
  201. </section>
  202. <section id="on-freebsd-and-openbsd">
  203. <h3><span class="section-number">2.1.2. </span>On FreeBSD and OpenBSD<a class="headerlink" href="#on-freebsd-and-openbsd" title="Link to this heading">¶</a></h3>
  204. <ul>
  205. <li><p>FreeBSD users, to add the package use:</p>
  206. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pkg<span class="w"> </span>install<span class="w"> </span>python3
  207. </pre></div>
  208. </div>
  209. </li>
  210. <li><p>OpenBSD users, to add the package use:</p>
  211. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pkg_add<span class="w"> </span>-r<span class="w"> </span>python
  212. pkg_add<span class="w"> </span>ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/&lt;insert<span class="w"> </span>your<span class="w"> </span>architecture<span class="w"> </span>here&gt;/python-&lt;version&gt;.tgz
  213. </pre></div>
  214. </div>
  215. <p>For example i386 users get the 2.5.1 version of Python using:</p>
  216. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>pkg_add<span class="w"> </span>ftp://ftp.openbsd.org/pub/OpenBSD/4.2/packages/i386/python-2.5.1p2.tgz
  217. </pre></div>
  218. </div>
  219. </li>
  220. </ul>
  221. </section>
  222. </section>
  223. <section id="building-python">
  224. <span id="building-python-on-unix"></span><h2><span class="section-number">2.2. </span>Building Python<a class="headerlink" href="#building-python" title="Link to this heading">¶</a></h2>
  225. <p>If you want to compile CPython yourself, first thing you should do is get the
  226. <a class="reference external" href="https://www.python.org/downloads/source/">source</a>. You can download either the
  227. latest release’s source or just grab a fresh <a class="reference external" href="https://devguide.python.org/setup/#get-the-source-code">clone</a>. (If you want
  228. to contribute patches, you will need a clone.)</p>
  229. <p>The build process consists of the usual commands:</p>
  230. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>./configure
  231. make
  232. make<span class="w"> </span>install
  233. </pre></div>
  234. </div>
  235. <p><a class="reference internal" href="configure.html#configure-options"><span class="std std-ref">Configuration options</span></a> and caveats for specific Unix
  236. platforms are extensively documented in the <a class="reference external" href="https://github.com/python/cpython/tree/3.12/README.rst">README.rst</a> file in the
  237. root of the Python source tree.</p>
  238. <div class="admonition warning">
  239. <p class="admonition-title">Warning</p>
  240. <p><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> can overwrite or masquerade the <code class="file docutils literal notranslate"><span class="pre">python3</span></code> binary.
  241. <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">altinstall</span></code> is therefore recommended instead of <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>
  242. since it only installs <code class="file docutils literal notranslate"><em><span class="pre">exec_prefix</span></em><span class="pre">/bin/python</span><em><span class="pre">version</span></em></code>.</p>
  243. </div>
  244. </section>
  245. <section id="python-related-paths-and-files">
  246. <h2><span class="section-number">2.3. </span>Python-related paths and files<a class="headerlink" href="#python-related-paths-and-files" title="Link to this heading">¶</a></h2>
  247. <p>These are subject to difference depending on local installation conventions;
  248. <a class="reference internal" href="configure.html#cmdoption-prefix"><code class="xref std std-option docutils literal notranslate"><span class="pre">prefix</span></code></a> and <a class="reference internal" href="configure.html#cmdoption-exec-prefix"><code class="xref std std-option docutils literal notranslate"><span class="pre">exec_prefix</span></code></a>
  249. are installation-dependent and should be interpreted as for GNU software; they
  250. may be the same.</p>
  251. <p>For example, on most Linux systems, the default for both is <code class="file docutils literal notranslate"><span class="pre">/usr</span></code>.</p>
  252. <table class="docutils align-default">
  253. <thead>
  254. <tr class="row-odd"><th class="head"><p>File/directory</p></th>
  255. <th class="head"><p>Meaning</p></th>
  256. </tr>
  257. </thead>
  258. <tbody>
  259. <tr class="row-even"><td><p><code class="file docutils literal notranslate"><em><span class="pre">exec_prefix</span></em><span class="pre">/bin/python3</span></code></p></td>
  260. <td><p>Recommended location of the interpreter.</p></td>
  261. </tr>
  262. <tr class="row-odd"><td><p><code class="file docutils literal notranslate"><em><span class="pre">prefix</span></em><span class="pre">/lib/python</span><em><span class="pre">version</span></em></code>,
  263. <code class="file docutils literal notranslate"><em><span class="pre">exec_prefix</span></em><span class="pre">/lib/python</span><em><span class="pre">version</span></em></code></p></td>
  264. <td><p>Recommended locations of the directories
  265. containing the standard modules.</p></td>
  266. </tr>
  267. <tr class="row-even"><td><p><code class="file docutils literal notranslate"><em><span class="pre">prefix</span></em><span class="pre">/include/python</span><em><span class="pre">version</span></em></code>,
  268. <code class="file docutils literal notranslate"><em><span class="pre">exec_prefix</span></em><span class="pre">/include/python</span><em><span class="pre">version</span></em></code></p></td>
  269. <td><p>Recommended locations of the directories
  270. containing the include files needed for
  271. developing Python extensions and
  272. embedding the interpreter.</p></td>
  273. </tr>
  274. </tbody>
  275. </table>
  276. </section>
  277. <section id="miscellaneous">
  278. <h2><span class="section-number">2.4. </span>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Link to this heading">¶</a></h2>
  279. <p>To easily use Python scripts on Unix, you need to make them executable,
  280. e.g. with</p>
  281. <div class="highlight-shell-session notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>chmod<span class="w"> </span>+x<span class="w"> </span>script
  282. </pre></div>
  283. </div>
  284. <p>and put an appropriate Shebang line at the top of the script. A good choice is
  285. usually</p>
  286. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python3</span>
  287. </pre></div>
  288. </div>
  289. <p>which searches for the Python interpreter in the whole <span class="target" id="index-0"></span><code class="xref std std-envvar docutils literal notranslate"><span class="pre">PATH</span></code>. However,
  290. some Unices may not have the <strong class="program">env</strong> command, so you may need to hardcode
  291. <code class="docutils literal notranslate"><span class="pre">/usr/bin/python3</span></code> as the interpreter path.</p>
  292. <p>To use shell commands in your Python scripts, look at the <a class="reference internal" href="../library/subprocess.html#module-subprocess" title="subprocess: Subprocess management."><code class="xref py py-mod docutils literal notranslate"><span class="pre">subprocess</span></code></a> module.</p>
  293. </section>
  294. <section id="custom-openssl">
  295. <span id="unix-custom-openssl"></span><h2><span class="section-number">2.5. </span>Custom OpenSSL<a class="headerlink" href="#custom-openssl" title="Link to this heading">¶</a></h2>
  296. <ol class="arabic">
  297. <li><p>To use your vendor’s OpenSSL configuration and system trust store, locate
  298. the directory with <code class="docutils literal notranslate"><span class="pre">openssl.cnf</span></code> file or symlink in <code class="docutils literal notranslate"><span class="pre">/etc</span></code>. On most
  299. distribution the file is either in <code class="docutils literal notranslate"><span class="pre">/etc/ssl</span></code> or <code class="docutils literal notranslate"><span class="pre">/etc/pki/tls</span></code>. The
  300. directory should also contain a <code class="docutils literal notranslate"><span class="pre">cert.pem</span></code> file and/or a <code class="docutils literal notranslate"><span class="pre">certs</span></code>
  301. directory.</p>
  302. <div class="highlight-shell-session notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>find<span class="w"> </span>/etc/<span class="w"> </span>-name<span class="w"> </span>openssl.cnf<span class="w"> </span>-printf<span class="w"> </span><span class="s2">&quot;%h\n&quot;</span>
  303. <span class="go">/etc/ssl</span>
  304. </pre></div>
  305. </div>
  306. </li>
  307. <li><p>Download, build, and install OpenSSL. Make sure you use <code class="docutils literal notranslate"><span class="pre">install_sw</span></code> and
  308. not <code class="docutils literal notranslate"><span class="pre">install</span></code>. The <code class="docutils literal notranslate"><span class="pre">install_sw</span></code> target does not override
  309. <code class="docutils literal notranslate"><span class="pre">openssl.cnf</span></code>.</p>
  310. <div class="highlight-shell-session notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>curl<span class="w"> </span>-O<span class="w"> </span>https://www.openssl.org/source/openssl-VERSION.tar.gz
  311. <span class="gp">$ </span>tar<span class="w"> </span>xzf<span class="w"> </span>openssl-VERSION
  312. <span class="gp">$ </span><span class="nb">pushd</span><span class="w"> </span>openssl-VERSION
  313. <span class="gp">$ </span>./config<span class="w"> </span><span class="se">\</span>
  314. <span class="w"> </span>--prefix<span class="o">=</span>/usr/local/custom-openssl<span class="w"> </span><span class="se">\</span>
  315. <span class="w"> </span>--libdir<span class="o">=</span>lib<span class="w"> </span><span class="se">\</span>
  316. <span class="w"> </span>--openssldir<span class="o">=</span>/etc/ssl
  317. <span class="gp">$ </span>make<span class="w"> </span>-j1<span class="w"> </span>depend
  318. <span class="gp">$ </span>make<span class="w"> </span>-j8
  319. <span class="gp">$ </span>make<span class="w"> </span>install_sw
  320. <span class="gp">$ </span><span class="nb">popd</span>
  321. </pre></div>
  322. </div>
  323. </li>
  324. <li><p>Build Python with custom OpenSSL
  325. (see the configure <code class="docutils literal notranslate"><span class="pre">--with-openssl</span></code> and <code class="docutils literal notranslate"><span class="pre">--with-openssl-rpath</span></code> options)</p>
  326. <div class="highlight-shell-session notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span><span class="nb">pushd</span><span class="w"> </span>python-3.x.x
  327. <span class="gp">$ </span>./configure<span class="w"> </span>-C<span class="w"> </span><span class="se">\</span>
  328. <span class="w"> </span>--with-openssl<span class="o">=</span>/usr/local/custom-openssl<span class="w"> </span><span class="se">\</span>
  329. <span class="w"> </span>--with-openssl-rpath<span class="o">=</span>auto<span class="w"> </span><span class="se">\</span>
  330. <span class="w"> </span>--prefix<span class="o">=</span>/usr/local/python-3.x.x
  331. <span class="gp">$ </span>make<span class="w"> </span>-j8
  332. <span class="gp">$ </span>make<span class="w"> </span>altinstall
  333. </pre></div>
  334. </div>
  335. </li>
  336. </ol>
  337. <div class="admonition note">
  338. <p class="admonition-title">Note</p>
  339. <p>Patch releases of OpenSSL have a backwards compatible ABI. You don’t need
  340. to recompile Python to update OpenSSL. It’s sufficient to replace the
  341. custom OpenSSL installation with a newer version.</p>
  342. </div>
  343. </section>
  344. </section>
  345. <div class="clearer"></div>
  346. </div>
  347. </div>
  348. </div>
  349. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  350. <div class="sphinxsidebarwrapper">
  351. <div>
  352. <h3><a href="../contents.html">Table of Contents</a></h3>
  353. <ul>
  354. <li><a class="reference internal" href="#">2. Using Python on Unix platforms</a><ul>
  355. <li><a class="reference internal" href="#getting-and-installing-the-latest-version-of-python">2.1. Getting and installing the latest version of Python</a><ul>
  356. <li><a class="reference internal" href="#on-linux">2.1.1. On Linux</a></li>
  357. <li><a class="reference internal" href="#on-freebsd-and-openbsd">2.1.2. On FreeBSD and OpenBSD</a></li>
  358. </ul>
  359. </li>
  360. <li><a class="reference internal" href="#building-python">2.2. Building Python</a></li>
  361. <li><a class="reference internal" href="#python-related-paths-and-files">2.3. Python-related paths and files</a></li>
  362. <li><a class="reference internal" href="#miscellaneous">2.4. Miscellaneous</a></li>
  363. <li><a class="reference internal" href="#custom-openssl">2.5. Custom OpenSSL</a></li>
  364. </ul>
  365. </li>
  366. </ul>
  367. </div>
  368. <div>
  369. <h4>Previous topic</h4>
  370. <p class="topless"><a href="cmdline.html"
  371. title="previous chapter"><span class="section-number">1. </span>Command line and environment</a></p>
  372. </div>
  373. <div>
  374. <h4>Next topic</h4>
  375. <p class="topless"><a href="configure.html"
  376. title="next chapter"><span class="section-number">3. </span>Configure Python</a></p>
  377. </div>
  378. <div role="note" aria-label="source link">
  379. <h3>This Page</h3>
  380. <ul class="this-page-menu">
  381. <li><a href="../bugs.html">Report a Bug</a></li>
  382. <li>
  383. <a href="https://github.com/python/cpython/blob/main/Doc/using/unix.rst"
  384. rel="nofollow">Show Source
  385. </a>
  386. </li>
  387. </ul>
  388. </div>
  389. </div>
  390. <div id="sidebarbutton" title="Collapse sidebar">
  391. <span>«</span>
  392. </div>
  393. </div>
  394. <div class="clearer"></div>
  395. </div>
  396. <div class="related" role="navigation" aria-label="related navigation">
  397. <h3>Navigation</h3>
  398. <ul>
  399. <li class="right" style="margin-right: 10px">
  400. <a href="../genindex.html" title="General Index"
  401. >index</a></li>
  402. <li class="right" >
  403. <a href="../py-modindex.html" title="Python Module Index"
  404. >modules</a> |</li>
  405. <li class="right" >
  406. <a href="configure.html" title="3. Configure Python"
  407. >next</a> |</li>
  408. <li class="right" >
  409. <a href="cmdline.html" title="1. Command line and environment"
  410. >previous</a> |</li>
  411. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  412. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  413. <li class="switchers">
  414. <div class="language_switcher_placeholder"></div>
  415. <div class="version_switcher_placeholder"></div>
  416. </li>
  417. <li>
  418. </li>
  419. <li id="cpython-language-and-version">
  420. <a href="../index.html">3.12.3 Documentation</a> &#187;
  421. </li>
  422. <li class="nav-item nav-item-1"><a href="index.html" >Python Setup and Usage</a> &#187;</li>
  423. <li class="nav-item nav-item-this"><a href=""><span class="section-number">2. </span>Using Python on Unix platforms</a></li>
  424. <li class="right">
  425. <div class="inline-search" role="search">
  426. <form class="inline-search" action="../search.html" method="get">
  427. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  428. <input type="submit" value="Go" />
  429. </form>
  430. </div>
  431. |
  432. </li>
  433. <li class="right">
  434. <label class="theme-selector-label">
  435. Theme
  436. <select class="theme-selector" oninput="activateTheme(this.value)">
  437. <option value="auto" selected>Auto</option>
  438. <option value="light">Light</option>
  439. <option value="dark">Dark</option>
  440. </select>
  441. </label> |</li>
  442. </ul>
  443. </div>
  444. <div class="footer">
  445. &copy;
  446. <a href="../copyright.html">
  447. Copyright
  448. </a>
  449. 2001-2024, Python Software Foundation.
  450. <br />
  451. This page is licensed under the Python Software Foundation License Version 2.
  452. <br />
  453. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  454. <br />
  455. See <a href="/license.html">History and License</a> for more information.<br />
  456. <br />
  457. The Python Software Foundation is a non-profit corporation.
  458. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  459. <br />
  460. <br />
  461. Last updated on Apr 09, 2024 (13:47 UTC).
  462. <a href="/bugs.html">Found a bug</a>?
  463. <br />
  464. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  465. </div>
  466. </body>
  467. </html>
上海开阖软件有限公司 沪ICP备12045867号-1