tags:

views:

152

answers:

1

I know the obvious answer is to use virtualenv and virtualenvwrapper, but for various reasons I can't/don't want to do that. So how do I modify this command:

pip install package_name

to make pip install the package somewhere other than the default site-packages?

+4  A: 

Use:

pip install --install-option="--prefix=$PREFIX_PATH" package_name

You might also want to use --ignore-installed to force all dependencies to be reinstalled using this new prefix. You can use --install-option to multiple times to add any of the options you can use with python setup.py install (--prefix is probably what you want, but there are a bunch more options you could use).

Ian Bicking