Running Python 2.7.3, installed with HomeBrew, on a mac.
Installed several packages using PIP, including virtualenv. (Using virtualenv as an example, but NONE of the
Download virtualenv.py if your system does not provide virtualenv command:
curl -L -o virtualenv.py https://raw.github.com/pypa/virtualenv/master/virtualenv.py
First create your virtualenv folder:
python virtualenv.py venv # venv <-- name of the folder
You need run virtualenv's activate in shell:
. venv/bin/activate
or
source venv/bin/activate
This fixes PYTHONPATH and PATH. You do this once per each shell session. Then python command will magically work :)
Now run pip, packages will be installed in venv.
More info (disclaimer, I am the author) http://opensourcehacker.com/2012/09/16/recommended-way-for-sudo-free-installation-of-python-software-with-virtualenv/