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


WARNING: The directory '/home/ssozh/.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.

 

大概是由於pip需要建立緩存,因此在你的$HOME/XXX文件夾下建立了.cache/pip的文件夾。默認權限是drwx------。但我想進入這個文件夾卻出現了拒絕訪問,這個顯然是不科學的,我一氣之下刪除了這個文件夾,然后重新執行pip list,這個文件夾又重新出現了,這次就不再出現上面的文字了。也不需要使用sudo -H。(畢竟你在該用戶下使用虛擬環境也沒有辦法使用sudo -H)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM