[英]Equivalent from easy_install of --install-dir and --script-dir on PIP
[英]What is the pip equivalent to easy_install/ez_setup's --install-dir and --script-dir?
我们正在使用easy_install在Windows上安装到本地构建环境目录。
(这有助于同时使用不同的第三方软件包来提供多个签出版本,等等。有点类似于virtualenv,但也适用于C / C ++ / Java / .NET。:)
通过使用--install-dir,我可以将python软件包放入带有.pth文件(PYTHONPATH指向该文件)的路径中,并将--script-dir放入PATH中包含的目录中,以便可以从命令提示符处运行所有内容。
因此,今天我使用类似:
python ez_setup.py -d c:\_work\theproject\3rd\python -s c:\_work\theproject\3rd\bin\ sphinx=1.0.5
但是,我想改用pip
,只是因为它具有本地缓存。 (也为我们的构建奴隶提供了帮助,该奴隶当前每天两次两次下载这些软件包。)
但是,我无法哄骗pip进行与easy_install相同的操作。
有任何想法吗?
--install-dir
可以使用--install-purelib
和--install-platlib
:
像这样:
--install-option=--install-purelib=<installdir>
--install-option=--install-platlib=<installdir>
请注意,当使用python.subprocess.call调用pip.exe并在Windows上运行时,如SteveMc在注释中那样在安装选项周围指定双引号(“)无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.