Skip to main content

Posts

Showing posts from June, 2017

User-site-installed python packages, and PATH modification

Python makes it apparently easy to install packages. Just use pip , or any of the other more-or-less old and deprecated ways to install them, right? (heh) The first difficulty is that maybe your system's Python needs sudo to install those packages, and you don't want (or even can't) use it. The definitive solution is to use virtual environments, but that can feel like going too far in the "local" direction. You might just want to have something at the user level, without having the risks of using sudo , but still global for everything that the user does. Well, turns out that PEP 370 allows you to have user-local installs of packages. You're supposed to run pip --user install whatever . But now you have to remember to always use the --user flag! Kinda breaks the purpose of having something "global for everything that the user does".