Using sudo for local development tooling is a bad idea. This is the bare minimum to get your python environment up and running so you can install pip and virtualenv at the user level and then continue to use [virtualenv][1] to get your own project environments running.
- OSX 10.9+
- You have homebrew installed
/usr/loca/bin
is part of your$PATH
$ ls /usr/local/lib | grep python
python2.7
mkdir -p /usr/local/lib/python2.7/site-packages
Use your favourite editor.
subl ~/.pydistutils.cfg
Add the following lines
[install]
install_lib = /usr/local/lib/python$py_version_short/site-packages
install_scripts = /usr/local/bin
export PYTHONPATH=/usr/local/lib/python2.7/site-packages
Now reload your configuration
source ~/.zshrc
easy_install pip
pip install virtualenv