user site-packages, --prefix, --home and friends

R. David Murray rdmurray at bitdance.com
Tue Mar 24 08:22:09 EDT 2009


Carl <tg2.user at gmail.com> wrote:
> I am very confused by PEP-370 per-user site-packages. It is not
> mentioned at all in the document about installing Python modules :
> http://docs.python.org/3.0/install/index.html.
> 
> It seems that --home or --prefix already provide per-user site-
> packages capability. Can someone explain what are the differences and
> what is the best practice in various situations?

I'm by no means an authority, but by my reading of the PEP there are
two major items that differentiate --user from --prefix and --home:
automatic per-python-version installation, and handling of .pth files.

As for best practice, I would say whichever one meets your needs.
The PEP is addressing the needs of users who do not have root privs but
who want to install packages via distutils in such a way that they will
act as if they had been installed in the system site-packages directory.

--
R. David Murray           http://www.bitdance.com




More information about the Python-list mailing list