<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Python on FUTURE204 - 分享与收获</title>
        <link>https://www.future204.top/categories/python/</link>
        <description>Recent content in Python on FUTURE204 - 分享与收获</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Mon, 14 Aug 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://www.future204.top/categories/python/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>pip install 自定义镜像源加速安装</title>
        <link>https://www.future204.top/p/pip-install-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F%E6%BA%90%E5%8A%A0%E9%80%9F%E5%AE%89%E8%A3%85/</link>
        <pubDate>Mon, 14 Aug 2023 00:00:00 +0000</pubDate>
        
        <guid>https://www.future204.top/p/pip-install-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F%E6%BA%90%E5%8A%A0%E9%80%9F%E5%AE%89%E8%A3%85/</guid>
        <description>&lt;h1 id=&#34;pip-install-自定义镜像源加速安装&#34;&gt;pip install 自定义镜像源加速安装&lt;/h1&gt;
&lt;h2 id=&#34;方法一&#34;&gt;方法一&lt;/h2&gt;
&lt;p&gt;通过pip &lt;code&gt;-i&lt;/code&gt;参数 临时指定源地址。&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://www.future204.top/p/pip-install-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F%E6%BA%90%E5%8A%A0%E9%80%9F%E5%AE%89%E8%A3%85/Untitled.png&#34;
	width=&#34;901&#34;
	height=&#34;121&#34;
	srcset=&#34;https://www.future204.top/p/pip-install-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F%E6%BA%90%E5%8A%A0%E9%80%9F%E5%AE%89%E8%A3%85/Untitled_hu65de183bdcba9c98df70118b9edbe7c1_11754_480x0_resize_box_3.png 480w, https://www.future204.top/p/pip-install-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%95%9C%E5%83%8F%E6%BA%90%E5%8A%A0%E9%80%9F%E5%AE%89%E8%A3%85/Untitled_hu65de183bdcba9c98df70118b9edbe7c1_11754_1024x0_resize_box_3.png 1024w&#34;
	loading=&#34;lazy&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;744&#34;
		data-flex-basis=&#34;1787px&#34;
	
&gt;&lt;/p&gt;
&lt;p&gt;例如：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;方法二&#34;&gt;方法二&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;编辑配置文件 &lt;code&gt;~/.pip/pip.conf&lt;/code&gt; ，如果没有这个文件就手动创建。&lt;/p&gt;
&lt;p&gt;添加下面配置：&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[global] 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[install] 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;trusted-host = pypi.tuna.tsinghua.edu.cn
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;或者使用命令添加：&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip config &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pip config &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; install.trusted-host pypi.tuna.tsinghua.edu.cn
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;pip-国内的一些镜像源地址&#34;&gt;pip 国内的一些镜像源地址&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;阿里云 &lt;a class=&#34;link&#34; href=&#34;http://mirrors.aliyun.com/pypi/simple/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://mirrors.aliyun.com/pypi/simple/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;中国科技大学 &lt;a class=&#34;link&#34; href=&#34;https://pypi.mirrors.ustc.edu.cn/simple/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://pypi.mirrors.ustc.edu.cn/simple/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;豆瓣(douban) &lt;a class=&#34;link&#34; href=&#34;https://pypi.douban.com/simple/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://pypi.douban.com/simple/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;清华大学 &lt;a class=&#34;link&#34; href=&#34;https://pypi.tuna.tsinghua.edu.cn/simple/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://pypi.tuna.tsinghua.edu.cn/simple/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;参考资料&#34;&gt;参考资料&lt;/h2&gt;
&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://mirrors.tuna.tsinghua.edu.cn/help/pypi/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;https://mirrors.tuna.tsinghua.edu.cn/help/pypi/&lt;/a&gt;&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
