{"id":204233,"date":"2025-05-29T14:21:26","date_gmt":"2025-05-29T06:21:26","guid":{"rendered":"https:\/\/server.hk\/cnblog\/204233\/"},"modified":"2025-05-29T14:21:26","modified_gmt":"2025-05-29T06:21:26","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-linux-%e4%b8%8b%e9%87%8d%e6%96%b0%e7%bc%96%e8%af%91-python-3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/204233\/","title":{"rendered":"\u5982\u4f55\u5728 Linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 Python 3\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5728 Linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 Python 3\uff1f<\/h1>\n<p>\u5b66\u4e60\u8981\u52aa\u529b\uff0c\u4f46\u662f\u4e0d\u8981\u6025\uff01\u4eca\u5929\u7684\u8fd9\u7bc7\u6587\u7ae0<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5982\u4f55\u5728 Linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 Python 3\uff1f\u300b<\/span>\u5c06\u4f1a\u4ecb\u7ecd\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u60f3\u6df1\u5165\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\uff0c\u53ef\u4ee5\u5173\u6ce8\u6211\uff01\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u6587\u7ae0\u7684\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u90fd\u80fd\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241101\/17304696496724df113217a.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u5728 linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 python 3<\/strong><\/p>\n<p>\u5bf9\u4e8e python \u521d\u5b66\u8005\u6765\u8bf4\uff0c\u91cd\u65b0\u7f16\u8bd1 python 3 \u53ef\u80fd\u4f1a\u8ba9\u4eba\u751f\u754f\u3002\u4f46\u662f\uff0c\u6309\u7167\u6b63\u786e\u7684\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff0c\u53ef\u4ee5\u786e\u4fdd\u987a\u5229\u5b8c\u6210\u6574\u4e2a\u8fc7\u7a0b\u3002<\/p>\n<p>\u8981\u91cd\u65b0\u7f16\u8bd1 python 3\uff0c\u60a8\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u786e\u4fdd\u5df2\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\uff1a<\/strong><\/p>\n<ul>\n<li>zlib-devel\uff1a\u7528\u4e8e\u6784\u5efa zlib \u5e93<\/li>\n<li>openssl-devel\uff1a\u7528\u4e8e\u6784\u5efa openssl \u5e93<\/li>\n<li>bzip2-devel\uff1a\u7528\u4e8e\u6784\u5efa bzip2 \u5e93<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u83b7\u53d6 python \u6e90\u4ee3\u7801\uff1a<\/strong><br \/>\u4ece python \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u89e3\u538b python \u6e90\u4ee3\u7801\u3002<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u7f16\u8bd1\uff1a<\/strong><br \/>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u914d\u7f6e\u7f16\u8bd1\uff1a<\/p>\n<pre>.\/configure --prefix=\/usr\/python<\/pre>\n<p><strong>\u6ce8\u610f\uff1a<\/strong> &#8211;prefix \u9009\u9879\u6307\u5b9a python \u5b89\u88c5\u76ee\u5f55\u3002\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u66f4\u6539\u6b64\u8def\u5f84\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u8bd1\uff1a<\/strong><br \/>\u8fd0\u884c make \u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\uff1a<\/p>\n<pre>make<\/pre>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\uff1a<\/strong><br \/>\u6700\u540e\uff0c\u8fd0\u884c make install \u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<pre>make install<\/pre>\n<\/li>\n<\/ol>\n<p>\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u540e\uff0c\u5c06\u91cd\u65b0\u7f16\u8bd1\u5e76\u5b89\u88c5 python 3\u3002\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c python3 &#8211;version \u547d\u4ee4\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300a\u5982\u4f55\u5728 Linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 Python 3\uff1f\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8\u516c\u4f17\u53f7\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728 Linux \u4e0b\u91cd\u65b0\u7f16\u8bd1 &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-204233","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=204233"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204233\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=204233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=204233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=204233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}