After trying to install virtualenv with pip
$ pip install virtualenv
I got a permission denied error
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'
So I used sudo to install virtualenv
$ sudo pip install virtualenv
But then a warning showed up:
The directory '/Users/petertao/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/petertao/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
What does sudo's -H flag do?