{"id":3984,"date":"2021-06-05T20:11:05","date_gmt":"2021-06-05T12:11:05","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=3984"},"modified":"2021-06-05T20:11:06","modified_gmt":"2021-06-05T12:11:06","slug":"pip","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2021\/06\/05\/pip\/","title":{"rendered":"python\u65e0\u7f51\u7edc\u4e0b\u7528pip\u5b89\u88c5\u8f6f\u4ef6\u5305"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5f88\u591a\u65f6\u5019\uff0c\u516c\u53f8\u7684\u670d\u52a1\u5668\u90fd\u662f\u5904\u4e8e\u65e0\u7f51\u7edc\u7684\u73af\u5883\uff0c\u6b64\u65f6\u5982\u679c\u8981\u901a\u8fc7pip\u6765\u5b89\u88c5\u4e00\u4e9b\u63d2\u4ef6\u5c31\u4f1a\u5931\u8d25\uff0c\u6b64\u65f6\u53ef\u4ee5\u901a\u8fc7\u4e0b\u5217\u7684\u65b9\u5f0f\u6765\u5b9e\u73b0\u5b89\u88c5(windows\/linux\u901a\u7528)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u5148\u627e\u4e00\u53f0\u6709\u7f51\u7edc\u7684\u673a\u5668\uff0c\u5b89\u88c5python\u548cpip\uff0c\u5e76\u5b89\u88c5\u4e0a\u4f60\u9700\u8981\u7684\u4e00\u4e9b\u5b89\u88c5\u5305(\u65e0\u7f51\u7edc\u73af\u5883\u4e0b\u9700\u8981\u5b89\u88c5\u7684\u63d2\u4ef6)\uff0c\u901a\u8fc7\u547d\u4ee4pip  list\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u7684\u7cfb\u7edf\u5b89\u88c5\u4e86\u54ea\u4e9b\u63d2\u4ef6\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"233\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/8.png\" alt=\"\" class=\"wp-image-3986\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/8.png 562w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/8-300x124.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u5728E\u76d8\u76ee\u5f55\u4e0b\u65b0\u5efa\u76ee\u5f55packages(\u78c1\u76d8\u4f4d\u7f6e\u548c\u540d\u5b57\u90fd\u53ef\u81ea\u5b9a\u4e49)\uff0c\u5728cmd\u547d\u4ee4\u4e0b\u6267\u884c\u547d\u4ee4\u5bfc\u51fa\u5f53\u524d\u7535\u8111\u5b89\u88c5\u7684\u6240\u6709\u7b2c\u4e09\u65b9\u5b89\u88c5\u5305\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"551\" height=\"143\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/9-1.png\" alt=\"\" class=\"wp-image-3987\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/9-1.png 551w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/9-1-300x78.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u5b8c\u6210\u540e\uff0c\u6253\u5f00requirements.txt\u6587\u4ef6\uff0c\u53ef\u4ee5\u770b\u5230\u5df2\u5b89\u88c5\u7684\u7b2c\u4e09\u65b9\u5305\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"209\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/10.png\" alt=\"\" class=\"wp-image-3988\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/10.png 553w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/10-300x113.png 300w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p class=\"has-background has-luminous-vivid-amber-background-color wp-block-paragraph\">\u6ce8\u610f\uff1a\u5982\u679c\u53ea\u5b89\u88c5\u9700\u8981\u7684\u5305\uff0c\u53ef\u4ee5\u5c06\u5176\u4ed6\u4e0d\u9700\u8981\u7684\u7b2c\u4e09\u65b9\u5305\u5220\u9664\u5373\u53ef<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001\u901a\u8fc7requirements.txt\u914d\u7f6e\u6587\u4ef6\uff0c\u4e0b\u8f7d\u6240\u9700\u8981\u7684\u7b2c\u4e09\u65b9\u5305\u6587\u4ef6\uff0c\u672c\u4f8b\u5b50\u4e2drequirements.txt\u4e2d\u53ea\u4fdd\u7559\u4e86requests\u548curllib3\u6a21\u5757\uff0c\u5176\u4f59\u4e0d\u9700\u8981\u7684\u5df2\u5220\u9664\uff0c\u6267\u884c\u4e0b\u8f7d\u547d\u4ee4\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"157\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/11.png\" alt=\"\" class=\"wp-image-3989\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/11.png 563w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/11-300x84.png 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u5b8c\u6210\u540e\u5728E:\\package\u4e2d\u53ef\u4ee5\u770b\u5230\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"555\" height=\"220\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/12.png\" alt=\"\" class=\"wp-image-3990\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/12.png 555w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/12-300x119.png 300w\" sizes=\"auto, (max-width: 555px) 100vw, 555px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001 \u628apackage\u76ee\u5f55\u62f7\u5230\u5728\u65e0\u7f51\u7684\u73af\u5883\u4e0b\u7684\u670d\u52a1\u5668\u4e0a\uff0c\u6267\u884c\u547d\u4ee4\u5b89\u88c5\u7b2c\u4e09\u65b9\u5305\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> pip install &#8211;no-index &#8211;find-links=D:\\package -r D:\\package\\requirements.txt <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"305\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/2.png\" alt=\"\" class=\"wp-image-3992\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/2.png 670w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/2-300x137.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/06\/2-600x273.png 600w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u5305\u5df2\u7ecf\u5b89\u88c5\u6210\u529f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f88\u591a\u65f6\u5019\uff0c\u516c\u53f8\u7684\u670d\u52a1\u5668\u90fd\u662f\u5904\u4e8e\u65e0\u7f51\u7edc\u7684\u73af\u5883\uff0c\u6b64\u65f6\u5982\u679c\u8981\u901a\u8fc7pip\u6765\u5b89\u88c5\u4e00\u4e9b\u63d2\u4ef6\u5c31\u4f1a\u5931\u8d25\uff0c\u6b64\u65f6\u53ef\u4ee5\u901a\u8fc7\u4e0b\u5217\u7684\u65b9\u5f0f [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3994,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,29],"tags":[],"class_list":["post-3984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-yunwei"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3984"}],"version-history":[{"count":1,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3984\/revisions"}],"predecessor-version":[{"id":3993,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3984\/revisions\/3993"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/3994"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}