Install a Python package into a different directory using pip?

后端 未结 16 2630
借酒劲吻你
借酒劲吻你 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:21

    I suggest to follow the documentation and create ~/.pip/pip.conf file. Note in the documentation there are missing specified header directory, which leads to following error:

    error: install-base or install-platbase supplied, but installation scheme is incomplete
    

    The full working content of conf file is:

    [install]
    install-base=$HOME
    install-purelib=python/lib
    install-platlib=python/lib.$PLAT
    install-scripts=python/scripts
    install-headers=python/include
    install-data=python/data
    

    Unfortunatelly I can install, but when try to uninstall pip tells me there is no such package for uninstallation process.... so something is still wrong but the package goes to its predefined location.

提交回复
热议问题