Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57856

Re: How do I update a virtualenv?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <nedbat@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'reinstall': 0.09; 'subject:update': 0.09; 'subject:virtualenv': 0.09; 'to:addr:pobox.com': 0.09; 'to:addr:skip': 0.09; 'subject:How': 0.10; 'python': 0.11; 'django': 0.11; 'run:': 0.16; '(you': 0.16; 'do,': 0.16; 'sender:addr:gmail.com': 0.17; 'thanks,': 0.17; 'wrote:': 0.18; 'looked': 0.18; 'command': 0.22; 'appears': 0.22; 'install': 0.23; 'installation': 0.23; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'skip': 0.24; 'switched': 0.24; 'fairly': 0.24; 'sort': 0.25; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'to:2**1': 0.27; 'thus': 0.29; 'moved': 0.30; "i'm": 0.30; 'getting': 0.31; 'another.': 0.31; 'gcc': 0.31; 'development.': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'activate': 0.36; 'subject:?': 0.36; 'list': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'new': 0.61; 'today': 0.64; 'more': 0.64; 'different': 0.65; 'steps.': 0.91; 'technique': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ox2FBCky0+GBc0VCkUmdcIk31MnROX6ZrCHgKll/h/o=; b=LZ11qK/cmrqEyx3OTaC54qlIY2djfZvwYfuNoQbFviDicFsEMocJTt+uEl0I2L/bSr BfhQ06R8I58MM23HKLu112buLwTzGd7YQNEbXGDdTe5fweimwMAHYXyw2G84EBswwsQ8 9mSzuCjGw9hihmhin6D4HIjvFqiOKbrcs8Hi09faQKPhDcxt508BNsuVcIlEWDAlnUdQ 36OFYDywp9Fy12rz1SPrQu5rRmVfpUILinj1v12O8leER0LwO7XVfhXSP7wtb47yoIVT 88nXbPiMTxe/ZYqIO5Da2omxe3KqqCqIW3alSF/0JFMrQ15vu147KF7bFxDdHNWNX6Aj InTA==
X-Received by 10.236.180.38 with SMTP id i26mr17784331yhm.53.1383002187403; Mon, 28 Oct 2013 16:16:27 -0700 (PDT)
Sender Ned Batchelder <nedbat@gmail.com>
Date Mon, 28 Oct 2013 19:16:26 -0400
From Ned Batchelder <ned@nedbatchelder.com>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
MIME-Version 1.0
To Skip Montanaro <skip@pobox.com>, Python <python-list@python.org>
Subject Re: How do I update a virtualenv?
References <CANc-5Uy367Mu-zN30Z8xKfE_Zf9q4G15E_oVtB+HOWPja6MNag@mail.gmail.com>
In-Reply-To <CANc-5Uy367Mu-zN30Z8xKfE_Zf9q4G15E_oVtB+HOWPja6MNag@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1726.1383002195.18130.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383002195 news.xs4all.nl 15896 [2001:888:2000:d::a6]:59089
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:57856

Show key headers only | View raw


On 10/28/13 7:04 PM, Skip Montanaro wrote:
> I have a virtualenv I'm using for some Django development.  Today I
> switched from MacPorts to HomeBrew on my Mac. I'm thus getting a
> different version of gcc and its libs. How do I reinstall the
> virtualenv? I've looked around and found a few descriptions of what to
> do, but as I am little more than a monkey-see-monkey-do user of
> virtualenv, I don't understand what appears to be a fairly complex set
> of steps. Does virtualenv not have some sort of "upgrade" command that
> just does what's necessary?
>
> Thanks,
>
> Skip

Virtualenvs aren't built to be moved from one Python installation to 
another.  If you used pip to install your packages (you should), then 
you can activate the virtualenv, and run: $ pip freeze > requirements.txt

Then you can create a new virtualenv using the new Python executable, 
activate it, and:  $ pip install -r requirements.txt

This will reinstall all the packages you had installed previously. Even 
better is to maintain your own requirements.txt that has just the 
packages you need.  The "pip freeze" technique will also list packages 
installed as dependencies.

--Ned.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How do I update a virtualenv? Ned Batchelder <ned@nedbatchelder.com> - 2013-10-28 19:16 -0400

csiph-web