{"id":897,"date":"2024-11-07T15:55:00","date_gmt":"2024-11-07T07:55:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/897\/"},"modified":"2024-11-07T15:55:00","modified_gmt":"2024-11-07T07:55:00","slug":"python-%e5%ae%89%e8%a3%85-requests-%e9%81%87%e5%88%b0%e9%94%99%e8%af%af%ef%bc%9ainstall-upgrade-%e5%91%bd%e4%bb%a4%e4%bd%bf%e7%94%a8%e9%94%99%e8%af%af%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/897\/","title":{"rendered":"Python \u5b89\u88c5 Requests \u9047\u5230\u9519\u8bef\uff1ainstall\u2014upgrade \u547d\u4ee4\u4f7f\u7528\u9519\u8bef\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1007\" src=\"https:\/\/fwq.ai\/blog\/wp-content\/uploads\/2024\/11\/173052598426876.jpg\" width=\"800\" height=\"320\" srcset=\"https:\/\/fwq.ai\/blog\/wp-content\/uploads\/2024\/11\/173052598426876.jpg 800w, https:\/\/fwq.ai\/blog\/wp-content\/uploads\/2024\/11\/173052598426876-300x120.jpg 300w, https:\/\/fwq.ai\/blog\/wp-content\/uploads\/2024\/11\/173052598426876-768x307.jpg 768w, https:\/\/fwq.ai\/blog\/wp-content\/uploads\/2024\/11\/173052598426876-670x268.jpg 670w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" title=\"Python \u5b89\u88c5 Requests \u9047\u5230\u9519\u8bef\uff1ainstall\u2014upgrade \u547d\u4ee4\u4f7f\u7528\u9519\u8bef\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" alt=\"Python \u5b89\u88c5 Requests \u9047\u5230\u9519\u8bef\uff1ainstall\u2014upgrade \u547d\u4ee4\u4f7f\u7528\u9519\u8bef\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>python \u5b89\u88c5 requests \u63d0\u793a\u9519\u8bef<\/strong><\/p>\n<p>\u5728\u4f7f\u7528\u547d\u4ee4\u884c\u5b89\u88c5 requests \u6a21\u5757\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u63d0\u793a\u4fe1\u606f\uff1a<\/p>\n<pre>\u60a8\u4f7f\u7528\u7684\u662fpip\u7248\u672c9.0.3\uff0c\u4f46\u662f\u7248\u672c18.0\u662f\u53ef\u7528\u7684\u3002\n\u60a8\u5e94\u8be5\u8003\u8651\u901a\u8fc7\u201cpython -m pip install\u2014upgrade pip\u201d\u547d\u4ee4\u8fdb\u884c\u5347\u7ea7\u3002<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6309\u7167\u63d0\u793a\u6267\u884c python -m pip install\u2014upgrade pip \u547d\u4ee4\u540e\uff0c\u53c8\u9047\u5230\u9519\u8bef\uff1a<\/p>\n<pre>error: unknown command \"install-upgrade\" - maybe you meant \"install\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u95ee\u9898\u539f\u56e0\uff1a<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201cPython\u514d\u8d39\u5b66\u4e60\u7b14\u8bb0\uff08\u6df1\u5165\uff09\u201d\uff1b<\/p>\n<p>\u63d0\u793a\u4e2d\u7684 install\u2014upgrade \u547d\u4ee4\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5e94\u4e3a install &#8211;upgrade\uff0c\u4e2d\u95f4\u6ca1\u6709\u8fde\u5b57\u7b26\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p>\u4f7f\u7528\u6b63\u786e\u7684\u547d\u4ee4\u683c\u5f0f\uff1a<\/p>\n<pre>python -m pip install --upgrade pip<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fPython \u5b89\u88c5 Requests \u9047\u5230\u9519\u8bef\uff1ainstall\u2014upgrade \u547d\u4ee4\u4f7f\u7528\u9519\u8bef\u600e\u4e48\u529e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>python \u5b89\u88c5 requests \u63d0\u793a\u9519\u8bef \u5728\u4f7f\u7528\u547d\u4ee4\u884c\u5b89\u88c5 requests \u6a21\u5757\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u63d0\u793a\u4fe1\u606f\uff1a \u60a8\u4f7f\u7528\u7684\u662fpip\u7248\u672c9.0.3\uff0c\u4f46\u662f\u7248\u672c18.0\u662f\u53ef\u7528\u7684\u3002 \u60a8\u5e94\u8be5\u8003\u8651\u901a\u8fc7\u201cpython -m pip install\u2014upgrade pip\u201d\u547d\u4ee4\u8fdb\u884c\u5347\u7ea7\u3002 \u767b\u5f55\u540e\u590d\u5236 \u6309\u7167\u63d0\u793a\u6267\u884c python -m pip install\u2014upgrade pip \u547d\u4ee4\u540e\uff0c\u53c8\u9047\u5230\u9519\u8bef\uff1a error: unknown command &#8220;install-upgrade&#8221; &#8211; maybe you meant &#8220;install&#8221; \u767b\u5f55\u540e\u590d\u5236 \u95ee\u9898\u539f\u56e0\uff1a \u7acb\u5373\u5b66\u4e60\u201cPython\u514d\u8d39\u5b66\u4e60\u7b14\u8bb0\uff08\u6df1\u5165\uff09\u201d\uff1b \u63d0\u793a\u4e2d\u7684 install\u2014upgrade \u547d\u4ee4\u683c\u5f0f\u4e0d\u6b63\u786e\uff0c\u5e94\u4e3a install &#8211;upgrade\uff0c\u4e2d\u95f4\u6ca1\u6709\u8fde\u5b57\u7b26\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u4f7f\u7528\u6b63\u786e\u7684\u547d\u4ee4\u683c\u5f0f\uff1a python -m pip install &#8211;upgrade pip \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662fPython \u5b89\u88c5 Requests \u9047\u5230\u9519\u8bef\uff1ainstall\u2014upgrade \u547d\u4ee4\u4f7f\u7528\u9519\u8bef\u600e\u4e48\u529e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-897","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/897","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=897"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}