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

使用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 ......code

相關文章
相關標籤/搜索