I am wondering what is the difference between these two commands (I have the feeling that they are identical):
sudo -H pip install <package>
pip --user install <package>
More informations:
From the sudo manpage:
-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.
And the pip user guide: https://pip.pypa.io/en/stable/user_guide/
Related questions:
What is the difference between pip install and sudo pip install?
What is the purpose of "pip install --user ..."? and
sudo pip install VS pip install --user
But none of them talk about the sudo -H
option or the precise difference between the two.