{"id":253,"date":"2024-11-14T10:56:04","date_gmt":"2024-11-14T02:56:04","guid":{"rendered":"https:\/\/telaker.cn\/?p=253"},"modified":"2024-11-17T10:40:48","modified_gmt":"2024-11-17T02:40:48","slug":"pip01","status":"publish","type":"post","link":"https:\/\/telaker.cn\/index.php\/2024\/11\/14\/pip01\/","title":{"rendered":"pip\u6e90\u7684\u67e5\u770b\u3001\u66f4\u6362"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u68c0\u67e5\u73af\u5883\u53d8\u91cf<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>echo $PIP_INDEX_URL<br>echo $PIP_EXTRA_INDEX_URL<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u68c0\u67e5\u5176\u4ed6\u914d\u7f6e\u6587\u4ef6<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cat .pip\/pip.conf\ncat \/etc\/pip.conf\ncat .config\/pip\/pip.conf<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u67e5\u770b\u5f53\u524d\u751f\u6548\u7684\u914d\u7f6e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>pip config list<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5c1d\u8bd5\u5220\u9664\u914d\u7f6e\u9879<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>pip config unset global.index-url<br>pip config unset global.extra-index-url<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6dfb\u52a0\u6e05\u534e\u6e90<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e34\u65f6\u4f7f\u7528<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install -i https:\/\/mirrors.tuna.tsinghua.edu.cn\/pypi\/web\/simple some-package<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5347\u7ea7pip\u540e\u52a0\u5165\u6e05\u534e\u6e90<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>python -m pip install --upgrade pip\npip config set global.index-url https:\/\/mirrors.tuna.tsinghua.edu.cn\/pypi\/web\/simple<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\uff08\u9009\uff09\u901a\u8fc7\u6e05\u534e\u6e90\u5347\u7ea7pip<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>python -m pip install -i https:\/\/mirrors.tuna.tsinghua.edu.cn\/pypi\/web\/simple --upgrade pip<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5982\u679c\u95ee\u9898\u4f9d\u7136\u5b58\u5728\uff0c\u8003\u8651\u91cd\u65b0\u5b89\u88c5pip<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install --upgrade --force-reinstall pip<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u68c0\u67e5\u73af\u5883\u53d8\u91cf\u3001<br \/>\n\u68c0\u67e5\u5176\u4ed6\u914d\u7f6e\u6587\u4ef6\u3001<br \/>\n\u67e5\u770b\u5f53\u524d\u751f\u6548\u7684\u914d\u7f6e\u3001<br \/>\n\u5c1d\u8bd5\u5220\u9664\u914d\u7f6e\u9879\u3001<br \/>\n\u6dfb\u52a0\u6e05\u534e\u6e90\u3001<br \/>\n\u5982\u679c\u95ee\u9898\u4f9d\u7136\u5b58\u5728\uff0c\u8003\u8651\u91cd\u65b0\u5b89\u88c5pip<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[28,29],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-pip","tag-pip","tag-python"],"_links":{"self":[{"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":0,"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"wp:attachment":[{"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/telaker.cn\/index.php\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}