What do (s)witch, (i)gnore, (w)ipe, (b)ackup options mean when installing a package from repository using pip?
A patch explaining this option was merged into the PIP documentation, but it was not released until Pip 6.0 (2014-12-22). (https://github.com/pypa/pip/commit/b5e54fc61c06268c131f1fad3bb4471e8c37bb25). Here is what that patch says:
--exists-action option
This option specifies default behavior when path already exists.Possible cases: downloading files or checking out repositories for installation,creating archives. If
--exists-action
is not defined, pip will promptwhen decision is needed.
(s)witch
Only relevant to VCS checkout. Attempt to switch the checkoutto the appropriate url and/or revision.
(i)gnore
Abort current operation (e.g. don't copy file, don't create archive,don't modify a checkout).
(w)ipe
Delete the file or VCS checkout before trying to create, download, or checkout a new one.
(b)ackup
Rename the file or checkout to
{name}{'.bak' * n}
, where n is some numberof.bak
extensions, such that the file didn't exist at some point.So the most recent backup will be the one with the largest number after.bak
.
And here is a link to description of that option in the now-updated documentation: https://pip.pypa.io/en/stable/cli/pip/#exists-action-option.