<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Venv on LeafCxy's Blog</title><link>https://leafcxy.github.io/tags/venv/</link><description>Recent content in Venv on LeafCxy's Blog</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Mon, 14 Sep 2026 14:00:00 +0800</lastBuildDate><atom:link href="https://leafcxy.github.io/tags/venv/index.xml" rel="self" type="application/rss+xml"/><item><title>Python venv 完全指南：虚拟环境一文讲透</title><link>https://leafcxy.github.io/posts/2026/09/python-venv/</link><pubDate>Mon, 14 Sep 2026 14:00:00 +0800</pubDate><guid>https://leafcxy.github.io/posts/2026/09/python-venv/</guid><description>&lt;p&gt;&amp;ldquo;项目 A 要用 requests 2.x，项目 B 要 3.x，两个都装在同一个 Python 里&amp;rdquo;——这是每个 Python 新手迟早撞上的墙。更常见的是：&lt;code&gt;pip install&lt;/code&gt; 装了一堆包之后，系统 Python 变得一团乱，重装系统前根本不敢动它。&lt;/p&gt;
&lt;p&gt;venv（Virtual Environment，虚拟环境）就是 Python 官方给的答案：&lt;strong&gt;每个项目一个独立的&amp;quot;小房间&amp;quot;，包各装各的，互不干扰&lt;/strong&gt;。它是 Python 3.3 起内置的标准库模块，不需要装任何额外工具，也是 2026 年每个 Python 项目的第一行命令。这篇文章把它从原理到实战讲透。&lt;/p&gt;</description></item></channel></rss>