{"id":204130,"date":"2025-05-29T10:23:53","date_gmt":"2025-05-29T02:23:53","guid":{"rendered":"https:\/\/server.hk\/cnblog\/204130\/"},"modified":"2025-05-29T10:23:53","modified_gmt":"2025-05-29T02:23:53","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-linux-%e7%b3%bb%e7%bb%9f%e4%b8%ad%e9%87%8d%e6%96%b0%e7%bc%96%e8%af%91%e5%b7%b2%e5%ae%89%e8%a3%85%e7%9a%84-python-3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/204130\/","title":{"rendered":"\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e2d\u91cd\u65b0\u7f16\u8bd1\u5df2\u5b89\u88c5\u7684 Python 3\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e2d\u91cd\u65b0\u7f16\u8bd1\u5df2\u5b89\u88c5\u7684 Python 3\uff1f<\/h1>\n<p>\u4e00\u5206\u8015\u8018\uff0c\u4e00\u5206\u6536\u83b7\uff01\u65e2\u7136\u6253\u5f00\u4e86\u8fd9\u7bc7\u6587\u7ae0\uff0c\u5c31\u575a\u6301\u770b\u4e0b\u53bb\u5427\uff01\u6587\u4e2d\u5185\u5bb9\u5305\u542b<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9&#8230;\u5e0c\u671b\u4f60\u80fd\u5728\u9605\u8bfb\u672c\u6587\u540e\uff0c\u80fd\u771f\u771f\u5b9e\u5b9e\u5b66\u5230\u77e5\u8bc6\u6216\u8005\u5e2e\u4f60\u89e3\u51b3\u5fc3\u4e2d\u7684\u7591\u60d1\uff0c\u4e5f\u6b22\u8fce\u5927\u4f6c\u6216\u8005\u65b0\u4eba\u670b\u53cb\u4eec\u591a\u7559\u8a00\u8bc4\u8bba\uff0c\u591a\u7ed9\u5efa\u8bae\uff01\u8c22\u8c22\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241029\/173018253567207d87d3fe9.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u5982\u4f55\u91cd\u65b0\u7f16\u8bd1\u5df2\u5b89\u88c5\u7684 python 3\uff1f<\/strong><\/p>\n<p>\u5bf9\u4e8e python 3 \u7684\u65b0\u624b\u6765\u8bf4\uff0c\u5728 linux \u7cfb\u7edf\u4e2d\uff0c\u5df2\u5b89\u88c5 python 3 \u540e\uff0c\u6709\u65f6\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u4ee5\u5b89\u88c5\u5176\u4ed6\u7684\u4f9d\u8d56\u3002\u4e0b\u9762\u662f\u91cd\u65b0\u7f16\u8bd1 python 3 \u7684\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u5728\u7ec8\u7aef\u4e2d\uff0c\u5207\u6362\u5230 python \u7684\u6e90\u4ee3\u7801\u76ee\u5f55\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8be5\u76ee\u5f55\u4f4d\u4e8e \/usr\/src\/python-3.x.x\uff08\u5176\u4e2d x.x.x \u662f python \u7684\u7248\u672c\u53f7\uff09\u3002<\/li>\n<li>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u914d\u7f6e\u91cd\u65b0\u7f16\u8bd1\u9009\u9879\uff1a<\/li>\n<\/ol>\n<pre>.\/configure --prefix=\/usr\/python<\/pre>\n<ol>\n<li>\u8fd9\u6761\u547d\u4ee4\u4f1a\u4fee\u6539\u7f16\u8bd1\u9009\u9879\uff0c\u5c06 python \u5b89\u88c5\u5230 \/usr\/python \u76ee\u5f55\uff08\u6216\u4f60\u6307\u5b9a\u7684\u5176\u4ed6\u76ee\u5f55\uff09\u3002<\/li>\n<li>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u7f16\u8bd1 python \u6e90\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>make<\/pre>\n<ol>\n<li>\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 python\uff1a<\/li>\n<\/ol>\n<pre>make install<\/pre>\n<p>\u4eca\u5929\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff1b\u5173\u4e8e\u6587\u7ae0\u7684\u6280\u672f\u77e5\u8bc6\u6211\u4eec\u4f1a\u4e00\u70b9\u70b9\u6df1\u5165\u4ecb\u7ecd\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e2d\u91cd\u65b0\u7f16&#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-204130","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204130","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=204130"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204130\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=204130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=204130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=204130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}