Search code examples
pip

Downgrading or installing earlier version of a package with pip


I have a version of a package installed (e.g. transformers 3.4.0) I want to install an earlier one. I install with:

pip install transformers==3.1.0

When checking installed versions with

pip freeze

I see the version did not change.


Solution

  • Although not intuitive, --upgrade means to ignore the exact version and ignore the current one if not the same. So, you need to "upgrade" to the earlier version for example:

    pip install --upgrade transformers==3.1.0