sudo pip install <package-name>like everybody on the internet tells you to. Use
pip install --user <package-name>. To omit
--user, create a
pip.confas outlined below.
We Rubyists generally don’t install packages via
sudo. We’re not crazy enough
to spill things all over the directories managed by the OS’ vendor.
From now on
pip install <package-name> will always install packages into your
~/Library/Python on macOS) and you can throw shit away easily.
While this should be enough for the occasional python developer consider using
virtualenv (which is equivalent to bundler’s
option) for more complex setups.
And when your OS’s Python version is not enough use pyenv (which is the equivalent to the Ruby version manager rbenv) to run multiple Pythons without conflicts.