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)