[Distutils] keeping a local ~/pylib directory of installed modules

John Gabriele jmg3000 at gmail.com
Mon May 14 22:01:07 CEST 2007


Hi,

I'm running on a server where I don't have root access. I've installed
my own Python into ~/py-2.5.1 (with a ~/py symlink), and created my
own ~/pylib directory for installing any extra packages I need.

I'd like to start using Easy Install / setuptools to manage package
installation, and have read the "Custom Installation Locations" --> "
"Traditional" PYTHONPATH-based Installation" section of the
EasyInstall manual (among other sections :). It's key that, if
easy_install installs prereq's, those packages end up installed in
~/pylib (since I don't have write access to any site-packages
directories).

The instructions at
http://peak.telecommunity.com/DevCenter/EasyInstall indicate that I
should probably have a ~/.pydistutils.cfg file containing either::

    [easy_install]
    install_dir = /home/me/pylib

or else::

    [install]
    install_lib = /home/me/pylib
    install_scripts = /home/me/bin

So, which one of those would be suitable for my setup? It looks like
an alternative to that would be using the ``--install-dir`` option to
easy_install every time I run it. If using ``--install-dir``, will
easy_install honor that when decending to instal dependencies as well?

Note, I've already got ~/py/bin in my PATH, PYTHONPATH is being set to
/home/me/pylib in my ~/.bash_profile, and it looks to me that,
installing packages by-hand, the correct way for my setup is::

    python setup.py install --home=/home/me/pylib

So, I'm guessing that the above configurations for easy_install will
get me the same thing.

Any tips appreciated.

Thanks.
---John


More information about the Distutils-SIG mailing list