quando eu faço sudo pip3 install numpy
, terminal mostra que:
The directory '/home/tiger/.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/tiger/.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.
Recomendo que eu faça sudo -H
, o terminal não mostrou nenhum aviso depois que eu digitei sudo -H pip3 install matplotlib
.
Eu digito man sudo
, isso mostra que:
-H, --set-home
Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry. Depending on the policy, this may be the default behavior.
Mas pip3 show numpy
e pip3 install matplotlib
mostram que Location: /usr/local/lib/python3.5/dist-packages
.
Então, qual é a diferença entre sudo -H pip install
e sudo pip install
?