Skip to main content
Topic: binaries are installed in ~/.local/bin (Read 439 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

binaries are installed in ~/.local/bin

I thought `~/.local/bin` directory is designated for user's personal scripts. But I see that ipython, pip, and other python programs are also installed there.

Questions:
1. how do I prevent future installations in that folder? (I want it just for my personal scripts)
2. why aren't they installed in /usr/local/bin or /bin?

Re: binaries are installed in ~/.local/bin

Reply #1
Installed, by what program?

It is advised to use Artix/Arch packages with the python- prefix rather than pip, to avoid potential package conflicts in the future.

See the documentation of a particular program to become familiar with its options and behavior.

/usr/local is defined in the FHS as:
Quote
The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated.

 

Re: binaries are installed in ~/.local/bin

Reply #2
The specification vaguely says ~/.local/bin is for "user-specific executables", and doesn't at all restrict it to user written scripts.

It's better to move your scripts elsewhere if you don't want them mixed. There's a pip option for specifying a non-default installation path, but it will make modules installed through pip unimportable by other Python scripts without using unsafe environment variables.

Quote
Why aren't they installed in /usr/local/bin or /bin?

/bin and /usr/bin are supposed to be read-only and managed by your system package manager. /usr/local/bin could be a conforming option, but it requires root access to write, so ~/.local/bin is used instead.