Library/Caches/pip' or its parent directory is not owned by the current user

使用mac开发安装包出现如下问题:
The directory '/Users/xxx/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/picasso/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.
解决方法:
(基于用户的权限来安装模块包):

sudo pip install django-celery --user -U

你可能感兴趣的:(Library/Caches/pip' or its parent directory is not owned by the current user)