How to make pip “dry-run”?

后端 未结 1 573
天命终不由人
天命终不由人 2021-02-11 12:15

For developing a script that runs pip install it would be usefull to have a --dry-run function.

I came across the --no-install op

1条回答
  •  醉酒成梦
    2021-02-11 12:41

    Yes - pip should have a dry-run option, to indicate what would happen in a complex situation. It is dangerous when running pip install downgrades packages without asking you. We need some way to ask what would happen if we run pip install -r requirements.txt without laboriously searching thru all the requirements and comparing them to the currently installed ones.

    It looks like setup.py used to have a dry-run. Folks are asking for it elsewhere.

    Some progress in that direction can be found here:

    • Dry Run for Python Pip | BackSlasher
    • nvie/pip-tools: A set of tools to keep your pinned Python dependencies fresh.

    Update: Activity continues on the official bug related to this: Add `pip install --dry-run` or similar, to get resolution result · Issue #53 · pypa/pip. It is blocked on the development of the dependency resolver, which is nearing completion

    0 讨论(0)
提交回复
热议问题