Reputation:
I want to install a pip package into a different directory, but pip refuses to do so.
$ pip install django -t output
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 264, in finalize_options
"must supply either home or prefix/exec-prefix -- not both"
DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
Upvotes: 0
Views: 633
Reputation: 5235
Update: When I wrote this answer pipenv was not available. If you having the same problem, I strongly recommend considering using it.
If you have installed Python using brew
you need to add a setup.cfg file (source) in your project-dir with the following content:
[install]
prefix=
That will resolve the problem. Alternatively, you can use virtualenv
or even better docker.
Upvotes: 1