4

I am having trouble finding good documentation for pip's --ignore-installed flag. pip install --help says simply:

Ignore the installed packages (reinstalling instead).

Other than the side effect of there being more cruft on your system, since installed packages will not be uninstalled when e.g., upgrading, are there any other known side effects? Is it possible for conflicts to arise with both packages installed? Will the newer package always "win", or is there a danger of accidentally using the old package without knowing it?

I have a situation that calls for me to potentially use this flag, ignoring a number of previously installed packages (because pip version 10 no longer uninstalls packages installed by distutils, but I want to make sure I am not potentially shooting myself in the foot. Thank you!

elethan
  • 16,408
  • 8
  • 64
  • 87
  • `--ignore-installed` reinstalls a package that might already be installed, so the original will be wiped out (if present). – l'L'l Apr 20 '18 at 02:28
  • 1
    Could you please elaborate on what you mean by "wiped out"? I have confirmed that in my case, both the original and the new package are retained. – elethan Apr 20 '18 at 02:56
  • Any files that were part of the package that exists will be replaced by the one you install (eg. if currently installed package contains `main.py`, then that will be overwritten by the `main.py` file from the package you install with `--ignore-installed`). – l'L'l Apr 20 '18 at 04:53
  • Possible duplicate of [pip: Reinstall a package even if it exists](https://stackoverflow.com/questions/53065940/pip-reinstall-a-package-even-if-it-exists) – ivan_pozdeev Dec 17 '18 at 10:32
  • Also possible duplicate of https://stackoverflow.com/questions/51913361/difference-between-pip-install-options-ignore-installed-and-force-reinstall – ivan_pozdeev Dec 17 '18 at 10:33

0 Answers0