The directory '/home/stone/.cache/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 execu

使用sudo pip install ......的时候出现下面一段黄色的代码:

The directory '/home/stone/.cache/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 '/home/stone/.cache/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 后面添加-H
sudo -H pip install ......

posted @ 2018-03-22 22:37  蚂蚁的希望  阅读(15477)  评论(1编辑  收藏  举报