{"id":63698,"date":"2025-04-29T17:29:49","date_gmt":"2025-04-29T09:29:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63698\/"},"modified":"2025-04-29T17:29:49","modified_gmt":"2025-04-29T09:29:49","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85pip-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63698\/","title":{"rendered":"linux\u670d\u52a1\u5668\u600e\u4e48\u5b89\u88c5pip"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5728 linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip\uff0c\u9996\u5148\u786e\u4fdd\u5df2\u5b89\u88c5 python\uff08\u7248\u672c\u81f3\u5c11\u4e3a 2.7 \u6216 3.4\uff09\uff0c\u7136\u540e\u4f7f\u7528 easy_install \u5b89\u88c5 pip\u3002\u786e\u8ba4\u5b89\u88c5\u6210\u529f\u540e\uff0c\u5373\u53ef\u4f7f\u7528 pip \u5b89\u88c5\u3001\u5347\u7ea7\u548c\u5378\u8f7d python \u5305\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060412361866197.jpg\" class=\"aligncenter\" title=\"linux\u670d\u52a1\u5668\u600e\u4e48\u5b89\u88c5pip\u63d2\u56fe\" alt=\"linux\u670d\u52a1\u5668\u600e\u4e48\u5b89\u88c5pip\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728 Linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip<\/strong><\/p>\n<p>pip \u662f Python \u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u5347\u7ea7\u548c\u5220\u9664 Python \u5305\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 Linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Python<\/strong><\/p>\n<p>\u786e\u4fdd\u670d\u52a1\u5668\u5df2\u5b89\u88c5 Python\uff0c\u7248\u672c\u4e0d\u4f4e\u4e8e 2.7 \u6216 3.4\u3002\u8981\u68c0\u67e5 Python \u7248\u672c\uff0c\u8bf7\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\uff1a<\/p>\n<pre>python --version<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u672a\u5b89\u88c5 Python\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff08\u6839\u636e\u60a8\u4f7f\u7528\u7684 Linux \u53d1\u884c\u7248\u8fdb\u884c\u9009\u62e9\uff09\uff1a<\/p>\n<ul>\n<li> <strong>Ubuntu\/Debian\uff1a<\/strong>sudo apt install 3-pip<\/li>\n<li> <strong>CentOS\/Red Hat\uff1a<\/strong>sudo yum install python3-pip<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 2\uff1a\u4f7f\u7528 easy_install \u5b89\u88c5 pip<\/strong><\/p>\n<p>easy_install \u662f Python \u7684\u53e6\u4e00\u4e2a\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u7528\u4e8e\u5b89\u88c5 pip\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo easy_install pip<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6b65\u9aa4 3\uff1a\u786e\u8ba4 pip \u5df2\u5b89\u88c5<\/strong><\/p>\n<p>\u8981\u786e\u8ba4 pip \u662f\u5426\u6210\u529f\u5b89\u88c5\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>pip --version<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u60a8\u5e94\u8be5\u4f1a\u770b\u5230 pip \u7684\u5df2\u5b89\u88c5\u7248\u672c\u3002<\/p>\n<p><strong>\u4f7f\u7528 pip \u5b89\u88c5\u548c\u7ba1\u7406 Python \u5305<\/strong><\/p>\n<p>\u5b89\u88c5 pip \u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u5b89\u88c5\u548c\u7ba1\u7406 Python \u5305\u3002\u8981\u5b89\u88c5\u5305\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>pip install &lt;package_name&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u5b89\u88c5 Django\uff0c\u8bf7\u8fd0\u884c\uff1a<\/p>\n<pre>pip install django<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8981\u5347\u7ea7\u5305\uff0c\u8bf7\u8fd0\u884c\uff1a<\/p>\n<pre>pip install &lt;package_name&gt; --upgrade<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8981\u5378\u8f7d\u5305\uff0c\u8bf7\u8fd0\u884c\uff1a<\/p>\n<pre>pip uninstall &lt;package_name&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u670d\u52a1\u5668\u600e\u4e48\u5b89\u88c5pip\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u5728 linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip\uff0c\u9996\u5148\u786e\u4fdd\u5df2\u5b89\u88c5 python\uff08\u7248\u672c\u81f3\u5c11\u4e3a 2.7 \u6216 3.4\uff09\uff0c\u7136\u540e\u4f7f\u7528 easy_install \u5b89\u88c5 pip\u3002\u786e\u8ba4\u5b89\u88c5\u6210\u529f\u540e\uff0c\u5373\u53ef\u4f7f\u7528 pip \u5b89\u88c5\u3001\u5347\u7ea7\u548c\u5378\u8f7d python \u5305\u3002 \u5728 Linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip pip \u662f Python \u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u5347\u7ea7\u548c\u5220\u9664 Python \u5305\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 Linux \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 pip\uff1a \u6b65\u9aa4 1\uff1a\u786e\u4fdd\u5df2\u5b89\u88c5 Python \u786e\u4fdd\u670d\u52a1\u5668\u5df2\u5b89\u88c5 Python\uff0c\u7248\u672c\u4e0d\u4f4e\u4e8e 2.7 \u6216 3.4\u3002\u8981\u68c0\u67e5 Python \u7248\u672c\uff0c\u8bf7\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\uff1a python &#8211;version \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u672a\u5b89\u88c5 Python\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff08\u6839\u636e\u60a8\u4f7f\u7528\u7684 Linux \u53d1\u884c\u7248\u8fdb\u884c\u9009\u62e9\uff09\uff1a Ubuntu\/Debian\uff1asudo apt install 3-pip CentOS\/Red Hat\uff1asudo yum install python3-pip \u6b65\u9aa4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63698","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63698"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63698\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}