I've been usually installed python packages through pip.
For Google App Engine, I need to install packages to another target directory.
I've tried:
pip install -I flask-restful --target ./lib
but it fails with:
must supply either home or prefix/exec-prefix -- not both
How can I get this to work?
Are you using OS X and Homebrew? The Homebrew python page https://github.com/Homebrew/brew/blob/master/docs/Homebrew-and-Python.md calls out a known issue with pip and a work around.
Worked for me.
Edit: Do not use this Homebrew recommended option, it will break normal pip operations.
If you're using virtualenv*, it might be a good idea to double check
which pip
you're using.If you see something like
/usr/local/bin/pip
you've broken out of your environment. Reactivating your virtualenv will fix this:VirtualEnv:
$ source bin/activate
VirtualFish:
$ vf activate [environ]
*: I use virtualfish, but I assume this tip is relevant to both.