<p>在详细介绍jfsebastian和nealmcb的贡献之后,这些天我确实使用了我的系统打包版本<a href="http://virtualenvwrapper.readthedocs.org" rel="nofollow noreferrer">virtualenvwrapper</a>(可在ubuntu12.04及更高版本上获得)。在</p>
<blockquote>
<p>virtualenvwrapper is a set of extensions to Ian Bicking’s virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow, making it easier to work on more than one project at a time without introducing conflicts in their dependencies.</p>
</blockquote>
<p>我使用的关键功能(回答这个问题)是:</p>
<ul>
<li><code>mkvirtualenv python=PYTHON_EXE</code>使用特定的Python可执行文件创建virtualenv(不必是系统打包的版本)</li>
<li><a href="http://virtualenvwrapper.readthedocs.org/en/latest/tips.html#tying-to-pip-s-virtualenv-support" rel="nofollow noreferrer">tie in to pip's virtualenv support</a></li>
<li><a href="http://virtualenvwrapper.readthedocs.org/en/latest/command_ref.html#allvirtualenv" rel="nofollow noreferrer">^{<cd2>}</a>升级所有虚拟机中的pip</li>
</ul>
<p>JFS提到的环境变量确实很有用:PIP_DOWNLOAD_CACHE、VIRTUALENV_USE_DISTRIBUTE、WORKON_HOME、VIRTUALENVWRAPPER_PYTHON。在</p>
<p>更新virtualenv本身的唯一原因是获取最新版本的setuptools(以前称为Distribute,以前称为setuptools)。我还没有必要这么做,但是我想从一个新的virtualenv开始,先升级Distribute/setuptools,然后升级pip,然后安装其他库。在</p>
<p>如果virtualenv的新版本是绝对必要的,那么<a href="https://stackoverflow.com/a/6875127/236081">the bootstrap script</a>的修改就可以了。在</p>