Upgrade python packages with pip: use "sudo" or "--user"?

Solution 1:

To me the only difference is the scheme path.

Using sudo your package will be installed in:

/usr/local/lib/python2.7/dist-packages/

With --user they are installed in your $HOME directory in:

$HOME/.local/lib/python2.7/site-packages

For your own system, I'd say it does not really matter. Use --user if you're not a sudoer member.

For code you publish, avoid --user.