pip requirement specifiers: role of the comma

I am trying to install a specific version of django-cms, thus executing pip install django-cms==3.0.5. That gives me the error No matching distribution found for django-mptt==0.5.2,==0.6,==0.6.1 (from django-cms==3.0.5). And indeed, on github the setup.py file specifies the requirement django-mptt==0.5.2,==0.6,==0.6.1.

The specification says that the comma serves as a logical 'and' operator but obviously no version can be 0.5.2, 0.6 AND 0.6.1 at the same time and thus the requirement is not matched. Just installing one of those versions via pip install django-mptt==0.5.2 works without a problem but there is still the same error about django-cms==3.0.5.

Can anyone shed light on this?

Answers


This was a bug in django-cms version 3.0.5. You can see the issue here: https://github.com/divio/django-cms/issues/3704.

You can try installing version 3.0.16 if you need to stay on the 3.0 release. If you REALLY need version 3.0.5, you can install pip==1.5.6, and django-cms should still install properly.

Edit Starting from pip version 6.0, multiple == version specifiers for a single package no longer work. One of the developers commented on Github:

This is the new expected behavior from PEP 440.

The old behavior of setuptools was confusing and didn't do what most people expected it to do. PEP 440 simplified it by changing the , to a logical AND statement.

See https://github.com/pypa/pip/issues/2258.


Need Your Help

cache-coherence MOESI protocol

multithreading caching

processor A owns a cache line which is shared with processor B.

Websphere MQ 7.1 Automatic Startup

ibm-mq

What is the best way to startup automatically Websphere MQ v7.1 queue managers during system startup? I see that there is a SupportPac for it, just want to make sure this is the right one. We have MQ