{"id":44962,"date":"2024-10-06T19:28:14","date_gmt":"2024-10-06T11:28:14","guid":{"rendered":"https:\/\/server.hk\/cnblog\/44962\/"},"modified":"2024-10-06T19:28:14","modified_gmt":"2024-10-06T11:28:14","slug":"linux-%e4%b8%ad%e5%ae%89%e8%a3%9d-easy_install%ef%bc%88setuptools%ef%bc%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/44962\/","title":{"rendered":"Linux \u4e2d\u5b89\u88dd easy_install\uff08setuptools\uff09"},"content":{"rendered":"<h1 id=\"linux-%e4%b8%ad%e5%ae%89%e8%a3%9d-easy_install%ef%bc%88setuptools%ef%bc%89-HFwXdNsHHb\">Linux \u4e2d\u5b89\u88dd easy_install\uff08setuptools\uff09<\/h1>\n<p>\u5728 Linux \u74b0\u5883\u4e2d\uff0cPython \u662f\u4e00\u500b\u5ee3\u6cdb\u4f7f\u7528\u7684\u7de8\u7a0b\u8a9e\u8a00\uff0c\u8a31\u591a\u958b\u767c\u8005\u4f9d\u8cf4\u65bc\u5b83\u4f86\u69cb\u5efa\u5404\u7a2e\u61c9\u7528\u7a0b\u5f0f\u3002\u70ba\u4e86\u65b9\u4fbf\u5730\u7ba1\u7406 Python \u5957\u4ef6\uff0csetuptools \u662f\u4e00\u500b\u975e\u5e38\u91cd\u8981\u7684\u5de5\u5177\u3002\u9019\u7bc7\u6587\u7ae0\u5c07\u4ecb\u7d39\u5982\u4f55\u5728 Linux \u7cfb\u7d71\u4e2d\u5b89\u88dd easy_install\uff0c\u9019\u662f setuptools \u7684\u4e00\u90e8\u5206\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-setuptools%ef%bc%9f-HFwXdNsHHb\">\u4ec0\u9ebc\u662f setuptools\uff1f<\/h2>\n<p>setuptools \u662f\u4e00\u500b Python \u5957\u4ef6\uff0c\u65e8\u5728\u7c21\u5316 Python \u5957\u4ef6\u7684\u767c\u4f48\u548c\u5b89\u88dd\u904e\u7a0b\u3002\u5b83\u63d0\u4f9b\u4e86\u8a31\u591a\u529f\u80fd\uff0c\u5305\u62ec\u4f9d\u8cf4\u7ba1\u7406\u3001\u7248\u672c\u63a7\u5236\u548c\u81ea\u52d5\u5316\u5b89\u88dd\u7b49\u3002easy_install \u662f setuptools \u7684\u4e00\u500b\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u5141\u8a31\u7528\u6236\u8f15\u9b06\u5b89\u88dd\u548c\u7ba1\u7406 Python \u5957\u4ef6\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d%e5%89%8d%e7%9a%84%e6%ba%96%e5%82%99-HFwXdNsHHb\">\u5b89\u88dd\u524d\u7684\u6e96\u5099<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd easy_install \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u78ba\u4fdd\u60a8\u7684\u7cfb\u7d71\u4e0a\u5df2\u7d93\u5b89\u88dd\u4e86 Python\u3002\u5927\u591a\u6578 Linux \u767c\u884c\u7248\u90fd\u9810\u88dd\u4e86 Python\uff0c\u4f46\u60a8\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5 Python \u662f\u5426\u5df2\u5b89\u88dd\uff1a<\/p>\n<pre><code>python --version<\/code><\/pre>\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f Python 3\uff0c\u5247\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>python3 --version<\/code><\/pre>\n<p>\u5982\u679c\u60a8\u7684\u7cfb\u7d71\u4e2d\u5c1a\u672a\u5b89\u88dd Python\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u9032\u884c\u5b89\u88dd\u3002\u4f8b\u5982\uff0c\u5728 Ubuntu \u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>sudo apt update\nsudo apt install python3<\/code><\/pre>\n<h2 id=\"%e5%ae%89%e8%a3%9d-setuptools-HFwXdNsHHb\">\u5b89\u88dd setuptools<\/h2>\n<p>\u63a5\u4e0b\u4f86\uff0c\u60a8\u9700\u8981\u5b89\u88dd setuptools\u3002\u9019\u53ef\u4ee5\u901a\u904e\u5305\u7ba1\u7406\u5668\u6216\u4f7f\u7528 pip \u4f86\u5b8c\u6210\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528 pip \u5b89\u88dd setuptools \u7684\u6b65\u9a5f\uff1a<\/p>\n<pre><code>sudo apt install python3-pip\npip3 install setuptools<\/code><\/pre>\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u4f7f\u7528 easy_install\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u5f9e setuptools \u4e2d\u7372\u53d6\u5b83\u3002\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u60a8\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5 easy_install \u662f\u5426\u5df2\u6210\u529f\u5b89\u88dd\uff1a<\/p>\n<pre><code>easy_install --version<\/code><\/pre>\n<h2 id=\"%e4%bd%bf%e7%94%a8-easy_install-%e5%ae%89%e8%a3%9d-python-%e5%a5%97%e4%bb%b6-HFwXdNsHHb\">\u4f7f\u7528 easy_install \u5b89\u88dd Python \u5957\u4ef6<\/h2>\n<p>\u4e00\u65e6\u60a8\u6210\u529f\u5b89\u88dd\u4e86 easy_install\uff0c\u60a8\u5c31\u53ef\u4ee5\u4f7f\u7528\u5b83\u4f86\u5b89\u88dd\u5176\u4ed6 Python \u5957\u4ef6\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528 easy_install \u5b89\u88dd\u67d0\u500b\u5957\u4ef6\u7684\u57fa\u672c\u8a9e\u6cd5\uff1a<\/p>\n<pre><code>easy_install \u5957\u4ef6\u540d\u7a31<\/code><\/pre>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u60f3\u5b89\u88dd Flask\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>easy_install Flask<\/code><\/pre>\n<h2 id=\"%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-HFwXdNsHHb\">\u6ce8\u610f\u4e8b\u9805<\/h2>\n<p>\u96d6\u7136 easy_install \u662f\u4e00\u500b\u65b9\u4fbf\u7684\u5de5\u5177\uff0c\u4f46\u5b83\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\u53ef\u80fd\u4e0d\u5982 pip \u7a69\u5b9a\u3002\u8a31\u591a\u958b\u767c\u8005\u73fe\u5728\u66f4\u50be\u5411\u65bc\u4f7f\u7528 pip \u4f86\u7ba1\u7406 Python \u5957\u4ef6\u3002\u56e0\u6b64\uff0c\u5efa\u8b70\u60a8\u5728\u53ef\u80fd\u7684\u60c5\u6cc1\u4e0b\u4f7f\u7528 pip \u4f86\u5b89\u88dd\u548c\u7ba1\u7406\u5957\u4ef6\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-HFwXdNsHHb\">\u7e3d\u7d50<\/h2>\n<p>\u5728 Linux \u7cfb\u7d71\u4e2d\u5b89\u88dd easy_install\uff08setuptools\uff09\u662f\u4e00\u500b\u76f8\u5c0d\u7c21\u55ae\u7684\u904e\u7a0b\u3002\u901a\u904e\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u6216 pip\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5730\u5b89\u88dd setuptools\uff0c\u4e26\u4f7f\u7528 easy_install \u4f86\u7ba1\u7406\u60a8\u7684 Python \u5957\u4ef6\u3002\u96d6\u7136 easy_install \u4ecd\u7136\u6709\u5176\u7528\u9014\uff0c\u4f46\u8003\u616e\u5230\u5176\u7a69\u5b9a\u6027\uff0c\u5efa\u8b70\u4f7f\u7528 pip \u9032\u884c\u5957\u4ef6\u7ba1\u7406\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u5404\u7a2e\u9700\u6c42\u3002\u7121\u8ad6\u662f\u958b\u767c\u74b0\u5883\u9084\u662f\u751f\u7522\u74b0\u5883\uff0c\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5728 Linux \u7cfb\u7d71\u4e2d\u5b89\u88dd easy_install\uff08setuptools\uff09\uff0c\u4ee5\u4fbf\u8f15\u9b06\u7ba1\u7406 Python \u5957\u4ef6\u548c\u4f9d\u8cf4\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-44962","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44962","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=44962"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44962\/revisions"}],"predecessor-version":[{"id":44963,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44962\/revisions\/44963"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=44962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=44962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=44962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}