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?
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 (https://refspecs.linuxbase.org/FHS_3.0/fhs/ch04s09.html) as:
The specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) 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.
/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.