Install Any pip Package Globally – Linux

Instead of the package installing in:

/home/username/.local/bin

and install it globally and have it accessed from any Linux user, install it with sudo -H flag. For example:

sudo -H pip3 install seaborn

The above installs it in /usr/local/lib/python3.5/dist-packages and is accessible globally by any user or Python application.

This issue arose when I was trying to run a Jupyter notebook. There was a missing seaborn Python package but it was only installed in the .local folder of the logged in user (/home/user/.local).

Leave a Reply