[Distutils] question about setuptools

Phillip J. Eby pje at telecommunity.com
Tue Sep 13 21:26:37 CEST 2005


At 09:07 PM 9/13/2005 +0200, Elvelind Grandin wrote:
>I seem to have a problem with setuptools. I install all packages with
>--home=~ (using
>.pydistutils.cfg) . this means I need to use require to import a egg,
>which is fine. But I cant import pkg_resources.require since it is
>installed in ~ and needs to be required itself.

See:

http://cvs.sourceforge.net/viewcvs.py/python/python/nondist/sandbox/setuptools/EasyInstall.txt?rev=HEAD&view=auto

under "Non-Root Installation" for details of the best way to do this; it 
may require a slight adjustment to your layout, but it will then allow you 
to use .pth files in your home-based setup.  You will have to clear out 
your --home setup from .pydistutils.cfg, though.

(Also, you may need the latest snapshot of setuptools (0.6a1c2) for the 
described installation procedure to work, as older versions may try to 
install to the "real" Python installation instead of your alternate home, 
when following the procedure given on the page above.)



More information about the Distutils-SIG mailing list