What is the difference between pip install and sudo pip install?

后端 未结 1 1610
北荒
北荒 2020-12-10 15:08

I tried installing Flask and a few packages using sudo in a virtual environment, but on trying to import Flask, it\'ll throw up an ImportError. On installing the same packag

1条回答
  •  感动是毒
    2020-12-10 16:00

    pip install
    

    Will run pip install as the current user


    sudo pip install
    

    Will run pip install with the security privileges of another user, root for example.
    You normally need to use sudo to install a package on a system.


    You may want to read linux-101-introduction-to-sudo

    0 讨论(0)
提交回复
热议问题