raxacoricofallapatorius raxacoricofallapatorius - 11 months ago 144
Python Question

Can I force pip to reinstall the current version?

I've come across situations where a current version of a package seems not to be working and requires reinstallation. But

pip install -U
won't touch a package that is already up-to-date. I see how to force a reinstallation by first uninstalling (with
pip uninstall
) and then installing, but is there a way to simply force an "update" to a nominally current version in a single step?

Answer Source

When upgrading, reinstall all packages even if they are already up-to-date.

-I, --ignore-installed

Ignore the installed packages (reinstalling instead).