{"id":839,"date":"2024-12-10T09:36:39","date_gmt":"2024-12-10T01:36:39","guid":{"rendered":"http:\/\/www.chan.ink\/?p=839"},"modified":"2024-12-10T09:36:43","modified_gmt":"2024-12-10T01:36:43","slug":"%e3%80%90linux%e5%b8%b8%e8%af%86%e3%80%91","status":"publish","type":"post","link":"http:\/\/www.chan.ink\/index.php\/2024\/12\/10\/%e3%80%90linux%e5%b8%b8%e8%af%86%e3%80%91\/","title":{"rendered":"\u3010Linux\u5e38\u8bc6\u3011"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\/usr\/lib\/python3.6<br>\/usr\/local\/lib\/python3.6<br>\/usr\/local\/lib64\/python3.6<br>\/usr\/bin\/python3.6 &nbsp;<br>\/usr\/lib64\/python3.6 &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e94\u4e2a\u8def\u5f84\u662fLinux\u7cfb\u7edf\u4e2d\u5e38\u89c1\u7684Python\u5b89\u88c5\u76ee\u5f55\uff0c\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u4e3b\u8981\u5728\u4e8ePython\u7684\u5b89\u88c5\u4f4d\u7f6e\u3001\u662f\u5426\u662f\u7cfb\u7edf\u7ea7\u5b89\u88c5\u3001\u4ee5\u53ca\u662f\u5426\u662f\u7279\u5b9a\u67b6\u6784\uff08\u598264\u4f4d\u621632\u4f4d\uff09\u4e0b\u7684\u5e93\u3002\u4e0b\u9762\u662f\u5b83\u4eec\u7684\u8be6\u7ec6\u89e3\u91ca\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <code>\/usr\/lib\/python3.6<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf4\u660e<\/strong>\uff1a\u8fd9\u662f\u7cfb\u7edf\u7ea7Python\u5e93\u7684\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\u4e4b\u4e00\u3002\u5b83\u5b58\u50a8\u4e86Python 3.6\u7248\u672c\u7684\u6807\u51c6\u5e93\u548c\u7b2c\u4e09\u65b9\u5e93\uff08\u4f8b\u5982\u901a\u8fc7<code>pip<\/code>\u5b89\u88c5\u7684\u5e93\uff09\u3002<\/li>\n\n\n\n<li><strong>\u7528\u9014<\/strong>\uff1a\u6b64\u8def\u5f84\u901a\u5e38\u5305\u542bPython\u89e3\u91ca\u5668\u8fd0\u884c\u65f6\u9700\u8981\u7684\u6838\u5fc3\u6a21\u5757\u548c\u4e00\u4e9b\u7cfb\u7edf\u5b89\u88c5\u7684\u5e93\u3002\u5b83\u4e00\u822c\u662f\u9488\u5bf9Python 3.6\u7684\uff0c\u53ef\u80fd\u4f1a\u6709\u591a\u4e2a\u7248\u672c\u7684\u7c7b\u4f3c\u8def\u5f84\u7528\u4e8e\u5176\u4ed6Python\u7248\u672c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. <code>\/usr\/local\/lib\/python3.6<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf4\u660e<\/strong>\uff1a\u8fd9\u662f\u53e6\u4e00\u4e2a\u7cfb\u7edf\u7ea7\u8def\u5f84\uff0c\u901a\u5e38\u7528\u4e8e\u624b\u52a8\u5b89\u88c5\u7684Python\u5305\uff08\u5982\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u7684Python\uff09\u3002\u5728\u67d0\u4e9bLinux\u7cfb\u7edf\u4e2d\uff0c<code>\/usr\/local<\/code>\u76ee\u5f55\u7528\u4e8e\u5b58\u653e\u6240\u6709\u7531\u7ba1\u7406\u5458\u624b\u52a8\u5b89\u88c5\u7684\u5e94\u7528\u548c\u5e93\uff0c\u800c\u4e0d\u662f\u7cfb\u7edf\u81ea\u5e26\u7684\u8f6f\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u7528\u9014<\/strong>\uff1a\u5f53\u4f60\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5Python\u6216\u4f7f\u7528\u67d0\u4e9b\u5305\u7ba1\u7406\u5de5\u5177\uff08\u4f8b\u5982<code>pip<\/code>\uff09\u5b89\u88c5Python\u5e93\u65f6\uff0c\u5b83\u4eec\u53ef\u80fd\u4f1a\u88ab\u5b89\u88c5\u5230<code>\/usr\/local\/lib\/python3.6<\/code>\u4e2d\uff0c\u800c\u4e0d\u662f\u9ed8\u8ba4\u7684\u7cfb\u7edf\u76ee\u5f55\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <code>\/usr\/local\/lib64\/python3.6<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf4\u660e<\/strong>\uff1a\u8fd9\u4e2a\u8def\u5f84\u4e0e<code>\/usr\/local\/lib\/python3.6<\/code>\u7c7b\u4f3c\uff0c\u4f46\u662f\u662f\u9488\u5bf964\u4f4d\u67b6\u6784\u7684\u5e93\u76ee\u5f55\u3002\u5982\u679c\u4f60\u572864\u4f4d\u7684Linux\u7cfb\u7edf\u4e0a\u8fd0\u884cPython\uff0cPython\u7684\u5e93\u53ef\u80fd\u4f1a\u88ab\u5b89\u88c5\u5230\u8fd9\u91cc\u3002<\/li>\n\n\n\n<li><strong>\u7528\u9014<\/strong>\uff1a\u5982\u679c\u4f60\u5b89\u88c5\u7684Python\u7248\u672c\u662f64\u4f4d\u67b6\u6784\uff0c\u90a3\u4e48\u5b89\u88c5\u7684\u5e93\u548c\u4f9d\u8d56\u9879\u5c06\u4f1a\u4f4d\u4e8e<code>\/usr\/local\/lib64\/python3.6<\/code>\u4e2d\u3002\u8fd9\u662f\u4e13\u95e8\u4e3a64\u4f4d\u7cfb\u7edf\u8bbe\u8ba1\u7684\u8def\u5f84\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">4. <code>\/usr\/bin\/python3.6<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf4\u660e<\/strong>\uff1a\u8fd9\u662fPython 3.6\u89e3\u91ca\u5668\u7684\u9ed8\u8ba4\u6267\u884c\u8def\u5f84\u4e4b\u4e00\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e2a\u8def\u5f84\u6307\u5411\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684Python 3.6\u89e3\u91ca\u5668\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u7528\u9014<\/strong>\uff1a\u901a\u8fc7\u8fd9\u4e2a\u8def\u5f84\u6267\u884cPython\u547d\u4ee4\u65f6\uff0c\u7cfb\u7edf\u4f1a\u8c03\u7528\u5bf9\u5e94\u7248\u672c\u7684Python\u89e3\u91ca\u5668\u3002\u5982\u679c\u4f60\u5728\u547d\u4ee4\u884c\u8f93\u5165<code>python3.6<\/code>\u6216<code>python<\/code>\uff08\u53d6\u51b3\u4e8e\u4f60\u7684\u7cfb\u7edf\u914d\u7f6e\uff09\uff0c\u8fd9\u4e2a\u8def\u5f84\u4f1a\u88ab\u7528\u6765\u542f\u52a8\u89e3\u91ca\u5668\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. <code>\/usr\/lib64\/python3.6<\/code><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8bf4\u660e<\/strong>\uff1a\u8fd9\u662f\u4e00\u4e2a64\u4f4d\u67b6\u6784\u7684Python\u5e93\u8def\u5f84\u3002\u5b83\u5305\u542b\u4e86\u9488\u5bf964\u4f4d\u7cfb\u7edf\u67b6\u6784\u7684Python\u5e93\u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u7528\u9014<\/strong>\uff1a\u5f53\u4f60\u572864\u4f4d\u7cfb\u7edf\u4e0a\u5b89\u88c5Python 3.6\u65f6\uff0c\u90e8\u5206Python\u5e93\u4f1a\u88ab\u5b89\u88c5\u5728\u6b64\u8def\u5f84\u4e2d\u3002\u5b83\u548c<code>\/usr\/lib\/python3.6<\/code>\u7c7b\u4f3c\uff0c\u4f46\u4e13\u95e8\u7528\u4e8e64\u4f4d\u67b6\u6784\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u603b\u7ed3<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u67b6\u6784\u5dee\u5f02<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li><code>\/usr\/lib64\/python3.6<\/code>\u548c<code>\/usr\/local\/lib64\/python3.6<\/code>\u90fd\u662f\u9488\u5bf964\u4f4d\u7cfb\u7edf\u7684Python\u5e93\u76ee\u5f55\u3002<\/li>\n\n\n\n<li><code>\/usr\/lib\/python3.6<\/code>\u548c<code>\/usr\/local\/lib\/python3.6<\/code>\u5219\u662f\u9488\u5bf932\u4f4d\u7cfb\u7edf\u7684\u5e93\u8def\u5f84\uff0c\u6216\u8005\u662f\u7528\u4e8e\u5b58\u50a8\u4e0d\u7279\u5b9a\u67b6\u6784\u7684\u5e93\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5b89\u88c5\u6e90<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li><code>\/usr\/lib\/python3.6<\/code> \u548c <code>\/usr\/bin\/python3.6<\/code> \u901a\u5e38\u4e0e\u7cfb\u7edf\u901a\u8fc7\u5305\u7ba1\u7406\u5668\uff08\u5982<code>apt<\/code>\u3001<code>yum<\/code>\u7b49\uff09\u5b89\u88c5\u7684Python\u7248\u672c\u76f8\u5173\u3002<\/li>\n\n\n\n<li><code>\/usr\/local\/lib\/python3.6<\/code> \u548c <code>\/usr\/local\/lib64\/python3.6<\/code> \u901a\u5e38\u662f\u7528\u4e8e\u624b\u52a8\u5b89\u88c5\u6216\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u7684Python\u7248\u672c\u7684\u5e93\u548c\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u7406\u89e3\u8fd9\u4e9b\u8def\u5f84\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406Python\u73af\u5883\uff0c\u7279\u522b\u662f\u5728\u8c03\u8bd5\u548c\u8bbe\u7f6e\u865a\u62df\u73af\u5883\u65f6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/usr\/lib\/python3.6\/usr\/local\/lib\/python3.6\/usr\/local\/li [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=839"}],"version-history":[{"count":1,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":840,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/posts\/839\/revisions\/840"}],"wp:attachment":[{"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.chan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}