Downgrading package with pip produces ValueError('Expected Version spec in',

drevicko picture drevicko · May 4, 2015 · Viewed 30k times · Source

On an Ubuntu 12.04 system where I don't have sudo rights, I've setup a virtual environment so I can have up to date python packages. The system virtualenv installed a pretty old version of pip into it (1.1) which I upgraded to 6.1.1.

I find now that if I try to specify a package version with something like:

pip install pymongo=2.6.2

pip throws a `ValueError('Expected version spec in', 'pymongo=2.6.2', 'at', '=2.6.2')

Answer

drevicko picture drevicko · May 4, 2015

The syntax for specifying a version is package==versionSpec with TWO equals signs, so I should have done:

pip install pymongo==2.6.2