Difference between sudo -H pip install and pip --user install











up vote
-1
down vote

favorite
1












I am wondering what is the difference between those two commands (I feel 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 "pip install --user ..."? and
sudo pip install VS pip install --user

But neither of them talk about the sudo -H option or the precise difference bewteen the two.










share|improve this question
























  • are identical if the user is root, the "--user" option install for current user only
    – ZiTAL
    14 hours ago










  • duplicated of: stackoverflow.com/questions/42988977/…
    – ZiTAL
    14 hours ago










  • This is not a duplicate. The other question has nothing about sudo in it.
    – Simon
    13 hours ago















up vote
-1
down vote

favorite
1












I am wondering what is the difference between those two commands (I feel 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 "pip install --user ..."? and
sudo pip install VS pip install --user

But neither of them talk about the sudo -H option or the precise difference bewteen the two.










share|improve this question
























  • are identical if the user is root, the "--user" option install for current user only
    – ZiTAL
    14 hours ago










  • duplicated of: stackoverflow.com/questions/42988977/…
    – ZiTAL
    14 hours ago










  • This is not a duplicate. The other question has nothing about sudo in it.
    – Simon
    13 hours ago













up vote
-1
down vote

favorite
1









up vote
-1
down vote

favorite
1






1





I am wondering what is the difference between those two commands (I feel 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 "pip install --user ..."? and
sudo pip install VS pip install --user

But neither of them talk about the sudo -H option or the precise difference bewteen the two.










share|improve this question















I am wondering what is the difference between those two commands (I feel 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 "pip install --user ..."? and
sudo pip install VS pip install --user

But neither of them talk about the sudo -H option or the precise difference bewteen the two.







python pip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 13 hours ago

























asked 14 hours ago









s.k

221113




221113












  • are identical if the user is root, the "--user" option install for current user only
    – ZiTAL
    14 hours ago










  • duplicated of: stackoverflow.com/questions/42988977/…
    – ZiTAL
    14 hours ago










  • This is not a duplicate. The other question has nothing about sudo in it.
    – Simon
    13 hours ago


















  • are identical if the user is root, the "--user" option install for current user only
    – ZiTAL
    14 hours ago










  • duplicated of: stackoverflow.com/questions/42988977/…
    – ZiTAL
    14 hours ago










  • This is not a duplicate. The other question has nothing about sudo in it.
    – Simon
    13 hours ago
















are identical if the user is root, the "--user" option install for current user only
– ZiTAL
14 hours ago




are identical if the user is root, the "--user" option install for current user only
– ZiTAL
14 hours ago












duplicated of: stackoverflow.com/questions/42988977/…
– ZiTAL
14 hours ago




duplicated of: stackoverflow.com/questions/42988977/…
– ZiTAL
14 hours ago












This is not a duplicate. The other question has nothing about sudo in it.
– Simon
13 hours ago




This is not a duplicate. The other question has nothing about sudo in it.
– Simon
13 hours ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













sudo is short for 'superuser do'. It simply runs the command with root privileges, which may be useful if you are installing to a directory you normally wouldn't have access to.



However, in the examples you have given the two commands would function identically, as you don't need root privileges to pip install --user






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371959%2fdifference-between-sudo-h-pip-install-and-pip-user-install%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    sudo is short for 'superuser do'. It simply runs the command with root privileges, which may be useful if you are installing to a directory you normally wouldn't have access to.



    However, in the examples you have given the two commands would function identically, as you don't need root privileges to pip install --user






    share|improve this answer

























      up vote
      0
      down vote













      sudo is short for 'superuser do'. It simply runs the command with root privileges, which may be useful if you are installing to a directory you normally wouldn't have access to.



      However, in the examples you have given the two commands would function identically, as you don't need root privileges to pip install --user






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        sudo is short for 'superuser do'. It simply runs the command with root privileges, which may be useful if you are installing to a directory you normally wouldn't have access to.



        However, in the examples you have given the two commands would function identically, as you don't need root privileges to pip install --user






        share|improve this answer












        sudo is short for 'superuser do'. It simply runs the command with root privileges, which may be useful if you are installing to a directory you normally wouldn't have access to.



        However, in the examples you have given the two commands would function identically, as you don't need root privileges to pip install --user







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 13 hours ago









        Moralous

        71111




        71111






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371959%2fdifference-between-sudo-h-pip-install-and-pip-user-install%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            SQL update select statement

            'app-layout' is not a known element: how to share Component with different Modules