Make initial setup:
- install pip and virtualenv:
sudo easy_install pip virtualenv
- install virtualenvwrapper:
sudo pip install virtualenvwrapper
To configure virtualenvwrapper:
- Create a directory for the virtual environments:
mkdir ~/projects/.envs
- Add to ~/.bashrc:
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python export WORKON_HOME=~/projects/.envs export PROJECT_HOME=~/projects source /usr/local/bin/virtualenvwrapper.sh
- Run:
source ~/.bashrc
Initial setup has been done. Now let's create a new virtual enviroment for Test project in ~/projects/test
mkvirtualenv test workon testNow you're in the 'test' environment. To install new packages you can use, for instance, pip.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.