How to specify versions on PIP when installing a python package with it's dependencies

3.6k views Asked by At

To install Celery with it's redis dependencies, one can do this.

$ pip install celery[redis]

Is it possible to explicitly provide version numbers to both celery and redis in the above command? It will effectively be the same as the following two commands

$ pip install -Iv redis==2.10.3
$ pip install -Iv celery==3.1.18
2

There are 2 answers

0
alec_djinn On

You can specify it with the flag -Iv

pip install -Iv redis==2.10.3
1
Vaulstein On

Use ==:

pip install -Iv redis==2.10.3