Saturday, November 6, 2021

Add install path for pip packages

After installing pip packages on Ubuntu 20.04, an warning message that packages are installed in '/home/user/.local/bin' which is not on PATH.Consider adding this directory to PATH.

To achieve this, open terminal and add the pip packages path to your .bashrc and then reload the file into your environment.

echo "export PATH=\"/home/${USER}/.local/bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc

If adding the install location to the path is not needed, this is only a warning and can be suppressed by using --no-warn-script-location when running pip install