Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy should I install Python packages into `~/.local`?
    primarykey
    data
    text
    <h2>Background</h2> <ol> <li>I don't develop using OS X's system provided Python versions (on OS X 10.6 that's Python 2.5.4 and 2.6.1).</li> <li>I don't install anything in the site-packages directory for the OS provided versions of Python. (The only exception is Mercurial installed from a binary package, which installs two packages in the Python 2.6.1 site-packages directory.)</li> <li>I installed three versions of Python, all using the Mac OS X installer disk image: <ol> <li>Python 2.6.6</li> <li>Python 2.7</li> <li>Python 3.1.2</li> </ol></li> <li>I don't like polluting the site-packages directory for my Python installations. So I only install the following five base packages in the site-packages directory. For the actual method/commands used to install these, see <a href="https://stackoverflow.com/questions/4324558/">SO Question 4324558</a>. <ol> <li><a href="http://peak.telecommunity.com/DevCenter/EasyInstall" rel="nofollow noreferrer">setuptools/ez_setup</a></li> <li><a href="http://packages.python.org/distribute/" rel="nofollow noreferrer">distribute</a></li> <li><a href="http://pip.openplans.org/" rel="nofollow noreferrer">pip</a></li> <li><a href="http://virtualenv.openplans.org/" rel="nofollow noreferrer">virtualenv</a></li> <li><a href="http://www.doughellmann.com/projects/virtualenvwrapper/" rel="nofollow noreferrer">virtualenvwrapper</a></li> </ol></li> <li>All other packages are installed in virtualenvs.</li> <li>I am the only user of this MacBook.</li> </ol> <h2>Questions</h2> <ol> <li>Given the above background, why should I install the five base packages in <code>~/.local</code>? 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. </li> <li>Using this method, should I be concerned about Glyph's comment that other things could potentially break (see his comment below)?</li> </ol> <p>Again, I'm only interested in where to install those five base packages.</p> <h2>Related Questions/Info</h2> <p>I'm asking because of <a href="https://stackoverflow.com/users/13564/glyph">Glyph</a>'s comment to <a href="https://stackoverflow.com/questions/4314376/python-egg-file/4314446#4314446">my answer</a> to <a href="https://stackoverflow.com/questions/4314376/">SO question 4314376</a>, which stated:</p> <blockquote> <p>NO. NEVER EVER do <code>sudo python setup.py install</code> whatever. Write a ~/.pydistutils.cfg that puts your pip installation into ~/.local or something. Especially files named <code>ez_setup.py</code> tend to suck down newer versions of things like setuptools and easy_install, which can potentially break other things on your operating system.</p> </blockquote> <p>Previously, I asked <a href="https://stackoverflow.com/questions/4324558/">What's the proper way to install pip, virtualenv, and distribute for Python?</a>. However, no one answered the "why" of using <code>~/.local</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload