When you build and install a python package, you have two choices: --home and --prefix. I never really got the difference between the two (I always use --home) but if I understood correctly one is deprecated and the other is "the way to go"™.
Am I wrong ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With