当我尝试pip安装任何东西时,我收到以下警告:
~$ sudo pip install -U scikit-learn
The directory '/home/alvas/.cache/pip/log' or its parent directory is not owned by the current user and the debug log 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/alvas/.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/alvas/.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.
Requirement already up-to-date: scikit-learn in /usr/local/lib/python3.4/dist-packages
为什么我的pip日志不属于我?如何解决问题?
看到该警告是否存在问题?
当我使用sudo -H pip install -U scikit-learn
时,警告消失。
当我尝试sudo -H
时,它将HOME变量设置为我的目录,但我已经在主目录中了?那么这里发生了什么?我的bash变量设置有什么问题吗?