According to the Installing Python Modules documentation, the "standard" way is to specify neither, and to let Python install it in either /usr/local/lib/pythonX.Y/site-packages
on *nix or C:\Python\
on Windows.
But, if you do decide to go for an alternate method, you can specify --home
to name the base installation directory, typically when you want to store multiple packages in just your own directory, usually on a multi-user machine when you don't have admin access, or perhaps for just testing before a system-wide install. --home
is not deprecated; in fact, it was only added to Windows as of Python 2.4.
The --prefix
option is more strange, because this lets you use one version of Python to build the module you're installing, while letting you install the module to a different location from normal. Another example is when you have to write to a directory with one name, while reading from it with another name (some network shares are set up this way).
So the --home
prefix specifies home/lib/python
, home/bin
, home/share
, while the --prefix
option specifies prefix/lib/pythonX.Y/site-packages/
, prefix/bin
, prefix/share
on *nix and prefix/Scripts
and prefix/Data
on Windows.