Install a Python package into a different directory using pip?

后端 未结 16 2450
借酒劲吻你
借酒劲吻你 2020-11-22 05:55

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 the command

16条回答
  •  失恋的感觉
    2020-11-22 06:01

    With pip v1.5.6 on Python v2.7.3 (GNU/Linux), option --root allows to specify a global installation prefix, (apparently) irrespective of specific package's options. Try f.i.,

    $ pip install --root=/alternative/prefix/path package_name
    

提交回复
热议问题