DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
On OSX(mac), assuming a project folder called /var/myproject

cd /var/myproject
Create a file called setup.cfg and add 

[install]
prefix=

Run pip install <packagename> -t .
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?