Q C*_*ron 2 python pip requirements.txt
我正在使用一些 github django 包的前沿版本,这些版本具有我不想安装的依赖项。
在开发中,在我自己的计算机上,我可以pip install
在命令行中使用并使用--no-dependencies
标志。但是,我的测试和生产环境需要一个用于部署目的的需求文件。不幸的是,该--no-dependencies
标志不能在需求文件中使用,如下所述:https : //pip.pypa.io/en/latest/reference/pip_install.html#requirements-file-format。
有没有办法告诉 pip 在使用需求文件时不要安装依赖项?
我通过使用两个需求文件并两次调用 pip 来解决这个问题。
pip install -r requirements.txt
pip install --no-deps -r no_deps.txt
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2853 次 |
最近记录: |