I'm using pip to install virtualenv, it's pretty easy,
pip install virutalenv
then create an sandbox for my project, with the option --no-site-packages to isolate from main site-packages,
virutalenv --no-site-packages social-map
finally, i cloned my project directly into social-map. To active this environment,
source social-map/bin/active
if you want to deactive this environment, just type deactive. I don't know how to deactive the envrionment before, what i did was exit the terminator, then open a new one, very silly...
we can check the settings as `which python` etc. If you check the active script in ~/your/env/bin/, you can find this, virtual will change your path, and put the virtualenv's path at the beginning of the path, it will change your terminer's PS1 also.
VIRTUAL_ENV="/Users/pengphy/Codes/virtualenvs/social-map" PATH="$VIRTUAL_ENV/bin:$PATH"
http://www.doughellmann.com/articles/pythonmagazine/completely-different/2008-02-ipython-and-virtualenv/index.html
http://mitchfournier.com/2010/06/25/getting-started-with-virtualenv-isolated-python-environments/
No comments:
Post a Comment