virtualenv 更新
![alternate text](http://blog.aclark.net/blog/_images/virtualenv-support-update.jpg)
This is you: I use virtualenv all the time and I love it!
这就是您:我一直都在使用virtualenv,我喜欢它!
This is you: “I use virtualenv all the time and I love it! But I hate having to manually upgrade setuptools within my virtualenvs because the PyPA has been so prolific with setuptools releases lately”.
这就是您:“我一直都在使用virtualenv,我喜欢它! 但是我讨厌不得不在我的virtualenvs中手动升级setuptools,因为PyPA最近在setuptools版本中表现得如此丰富 ”。
Actually this is me, but it may be you too. If this is you, you may be familiar with the following process. If not, you may want to be.
其实这是我,但也可能是您。 如果是您,则您可能熟悉以下过程。 如果没有,您可能想要成为。
Virtualenv和SetupTools (Virtualenv and setuptools)
When a virtualenv is created, virtualenv installs setuptools from a local distribution located in site-packages/virtualenv_support
. If that setuptools is out of date, so is the setuptools in your new virtualenv. To avoid having to manually upgrade setuptools within newly created virtualenvs, you can do this:
创建virtualenv时,virtualenv从位于site-packages/virtualenv_support
的本地发行版中安装setuptools。 如果该setuptools已过期,则新virtualenv中的setuptools也将过期。 为了避免在新创建的virtualenvs中手动升级setuptools,可以执行以下操作:
$ cd /usr/local/lib/python2.7/site-packages/virtualenv_support
$ curl -O https://pypi.python.org/packages/source/s/setuptools/setuptools-3.3.zip
$ cd /usr/local/lib/python2.7/site-packages/virtualenv_support
$ curl -O https://pypi.python.org/packages/source/s/setuptools/setuptools-3.3.zip
Et voila!
瞧!
$ bin/pip show setuptools
---
Name: setuptools
Version: 3.3
Location: /private/var/folders/1k/fmmlqcfn5jsbcqrqsw3q_slm0000gn/T/tmpE4vB1l/lib/python2.7/site-packages
Requires:
$ bin/pip show setuptools
---
Name: setuptools
Version: 3.3
Location: /private/var/folders/1k/fmmlqcfn5jsbcqrqsw3q_slm0000gn/T/tmpE4vB1l/lib/python2.7/site-packages
Requires:
If you are a Buildout user, this should save you endless frustration with Buildout attempting to upgrade Setuptools…
如果您是Buildout用户,这应该可以免除Buildout尝试升级Setuptools的烦恼...
attempting to upgrade Setuptools…
尝试升级Setuptools…
attempting to upgrade Setuptools…
尝试升级Setuptools…
attempting to upgrade Setuptools…
尝试升级Setuptools…
翻译自: https://www.pybloggers.com/2014/03/virtualenv-support-update/
virtualenv 更新