10

Was $HOME/.local/bin added to the PATH by default for Ubuntu 18.04? I can't remember if it was, but I've just done a fresh installation of 19.04 and it definitely isn't.

The reason I ask is that pip install --user puts Python executables in $HOME/.local/bin so they won't work without additional configuration.

I wanted to know if there was some configuration step I missed before I start messing with my .bashrc file.

Lorenz Keel
  • 8,905

1 Answers1

28

Ah I see what's going on. It is added to the path by $HOME/.profile provided it exists, which it doesn't on a fresh install. pip creates it when it installs a package, but the PATH is not modified until $HOME/.profile is reloaded.

So the fix is either, after installing a pip package for the first time,

  • source ~/.profile, or
  • logout and log back in again.