Hi John, I consider virtualenvs disposable, and by that I mean that I always ensure that I can regenerate them easily. For each virtualenv I keep a requirements file that lists all the packages I have installed including indirect dependencies, and with the exact version numbers. I update this file whenever I make changes to a virtualenv. Then when a virtualenv stops working for any reason I just regenerate it.
To export a requirements file you can use this command (note this must be done on a working virtualenv): $ pip freeze > requirements.txt To populate a virtualenv from a requirements file use this command after activating it: $ pip install -r requirements.txt I hope this helps. Miguel ----- Original Message ----- From: John Heasly <[email protected]> To: [email protected] Date: Wed, 30 Apr 2014 13:25:05 -0700 Subject: [portland] A homebrew-ed Python + virtualenv + virtualenvwrapper question > Hello all, > > Ive been bit by creating virtualenvs against a homebrew-installed systemwide > Python, upgrading the system Python, running "brew cleanup which deletes the > previous Python that the virtualenv was created against. Is there a way to > get virtualenvs to see the new Python? Or should I just stop with the brew > cleanup after brew upgrading the system Python? > > I figure this is a common enough scenario that there has to be a good > answer/best practice/light to dim the darkness of my ignorance. > > Thanks, > John > _______________________________________________ > Portland mailing list > [email protected] > https://mail.python.org/mailman/listinfo/portland >
_______________________________________________ Portland mailing list [email protected] https://mail.python.org/mailman/listinfo/portland
