~/.local
? Since I'm installing these base packages into the site-packages directories of Python distributions that I've installed, I'm isolated from the OS X's Python distributions. Again, I'm only interested in where to install those five base packages.
I'm asking because of Glyph's comment to my answer to SO question 4314376, which stated:
NO. NEVER EVER do
sudo python setup.py install
whatever. Write a ~/.pydistutils.cfg that puts your pip installation into ~/.local or something. Especially files namedez_setup.py
tend to suck down newer versions of things like setuptools and easy_install, which can potentially break other things on your operating system.
Previously, I asked What's the proper way to install pip, virtualenv, and distribute for Python?. However, no one answered the "why" of using ~/.local
.
There's no particularly good reason for or against installing in .local
for Mac OS X installations using framework builds. There is still some controversy among Python core developers on this point with Glyph arguing that the .local
location, introduced in Python 2.6 for other Unixy systems, should be used for Mac OS X and simplifies third-party installation processes, while others argue that the previous traditional locations for Mac OS X framework builds is more natural. In the end, it is up to you. Particularly if you are using virtual environments, if it works, don't worry about it.
As of 2020, I do not think it is a good idea to install Python packages into .local
, but to use virtualenv
to create a separate environment for each package.
My reason
While installations into .local
do not interfere with the system wide Python, you still can have conflicts between several packages installed into .local
.
P.S.: If you do you like virtualenv
you could also use pipx
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With