一、失败原因
The directory '/Users/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.
二、解决办法
直接 pip install django,不用sudo。权限的问题,对后续使用不影响。不管是用pip装什么模块,前面都尽量不要加sudo。
网友评论