<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Python &#8211; 元几录</title>
	<atom:link href="https://blog.dpean.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.dpean.com</link>
	<description></description>
	<lastBuildDate>Tue, 04 Nov 2025 12:26:52 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://blog.dpean.com/wp-content/uploads/2025/08/cropped-logo-1-150x150.png</url>
	<title>Python &#8211; 元几录</title>
	<link>https://blog.dpean.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>pip换清华源</title>
		<link>https://blog.dpean.com/%e7%9f%a5%e8%af%86/pip%e6%8d%a2%e6%b8%85%e5%8d%8e%e6%ba%90/</link>
					<comments>https://blog.dpean.com/%e7%9f%a5%e8%af%86/pip%e6%8d%a2%e6%b8%85%e5%8d%8e%e6%ba%90/#respond</comments>
		
		<dc:creator><![CDATA[dpecain]]></dc:creator>
		<pubDate>Tue, 04 Nov 2025 12:21:19 +0000</pubDate>
				<category><![CDATA[知识]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://blog.dpean.com/?p=712</guid>

					<description><![CDATA[临时使用 设为默认： 升级 pip： 将清华源设为默认： 参&#8230;]]></description>
										<content:encoded><![CDATA[
<h4 class="wp-block-heading">临时使用</h4>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 0 16px;font-size:0.8em;width:100%;text-align:left;background-color:#282A36;font-style:italic;color:#f6f6f4"><span style="border-bottom:1px solid rgba(251, 251, 239, 0.2)">Bash</span></span><span role="button" tabindex="0" style="color:#f6f6f4;display:none" aria-label="复制" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #62E884">pip</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">install</span><span style="color: #F6F6F4"> </span><span style="color: #BF9EEE">-i</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">some-package</span></span></code></pre></div>



<p> </p>



<h4 class="wp-block-heading">设为默认：</h4>



<p><strong>升级 pip：</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 0 16px;font-size:0.8em;width:100%;text-align:left;background-color:#282A36;font-style:italic;color:#f6f6f4"><span style="border-bottom:1px solid rgba(251, 251, 239, 0.2)">Bash</span></span><span role="button" tabindex="0" style="color:#f6f6f4;display:none" aria-label="复制" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>python -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade pip</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #62E884">python</span><span style="color: #F6F6F4"> </span><span style="color: #BF9EEE">-m</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">pip</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">install</span><span style="color: #F6F6F4"> </span><span style="color: #BF9EEE">-i</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple</span><span style="color: #F6F6F4"> </span><span style="color: #BF9EEE">--upgrade</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">pip</span></span></code></pre></div>



<p><strong>将清华源设为默认：</strong></p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#f6f6f4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:10px 0px 0 16px;font-size:0.8em;width:100%;text-align:left;background-color:#282A36;font-style:italic;color:#f6f6f4"><span style="border-bottom:1px solid rgba(251, 251, 239, 0.2)">Bash</span></span><span role="button" tabindex="0" style="color:#f6f6f4;display:none" aria-label="复制" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dracula-soft" style="background-color: #282A36" tabindex="0"><code><span class="line"><span style="color: #62E884">pip</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">config</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">set</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">global.index-url</span><span style="color: #F6F6F4"> </span><span style="color: #E7EE98">https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple</span></span></code></pre></div>



<p> </p>



<h4 class="wp-block-heading">参考资料</h4>



<ol class="wp-block-list">
<li><a href="https://mirrors.tuna.tsinghua.edu.cn/help/pypi/" target="_blank" rel="noreferrer noopener nofollow">PyPI 软件仓库 &#8211; 清华大学开源软件镜像站</a></li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.dpean.com/%e7%9f%a5%e8%af%86/pip%e6%8d%a2%e6%b8%85%e5%8d%8e%e6%ba%90/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
