The directory '/home/XXX/.cache/pip/http' or its parent directory is not owned by the current user

执行安装命令:

$ for req in $(cat requirements.txt); do sudo pip install $req; done

出现黄色提示:


The directory '/home/pheehu/.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.

 

 

 

解决方法:

1、添加sudo ,后执行。但是未解决该问题。仍然有该黄色提示。

$ for req in $(cat requirements.txt); do sudo pip install $req; done

 

2、添加sudo -H ,后执行。无黄色提示,但是却报如下错:

$ for req in $(cat requirements.txt); do sudo -H pip install $req; done

The directory '/home/XXX/.cache/pip/http' or its parent directory is not owned by the current user_第1张图片

 

最终选择的方法:

最后使用方法1:添加sudo 。

原因:虽然有黄色提示,但是未报错。不影响后面的运行。

$ for req in $(cat requirements.txt); do sudo pip install $req; done

您若有更好的解决方案,欢迎留言分享,不胜感激!感激!!!

 

参考链接:

https://blog.csdn.net/u010801696/article/details/79136290

https://www.cnblogs.com/Stone-Blossom/p/8627376.html

http://www.crazyit.org/forum.php?mod=viewthread&tid=12440

 

你可能感兴趣的:(开发环境搭建,caffe)