moadeep
moadeep

Reputation: 4118

Pip installing wrong version of a dependency - django

I am running an old RHEL5 server and would like to install a beta version of the python module openrem from pip.

I create a virtual env in my folder and issue the command

pip install openrem==0.7.0b13

The setup.py for openrem 0.7.0b13 has the following requirements

requires = [
    'django>=1.8,<1.9',
    'django-filter >= 0.10',
    'pytz >= 0a',
    'humanize',
    'pydicom >= 0.9.9',
    'django-pagination',
    'xlsxwriter',
    'celery >= 3.1',
    'argparse >= 1.2.1',
    'django-qsstats-magic',
    'python-dateutil',
    'django-solo',
    'django-crispy-forms'
    ]

However, I get the following message during the installation

Downloading/unpacking django>=1.8,<1.9 (from openrem==0.7.0b13)
Downloading Django-1.9rc1.tar.gz (7.3MB): 7.3MB downloaded
Running setup.py egg_info for package django

Low and behold django 1.9 is installed. The problem being openrem is incompatible with django 1.9. Why is pip ignoring the requirement to install django <1.9

Upvotes: 0

Views: 6259

Answers (1)

Georgina S
Georgina S

Reputation: 467

All I've managed to dig up is this:

To mitigate this risk, do not use the foo >=0.3, <0.4 style declaration, which has a purely numeric upper bound. <0.4 still admits versions 0.4a0, 0.4a1, 0.4b0, 0.4c3, etc. Instead, use an upper bound like <0.4a0, as in foo >=0.3, <0.4a0, when you write your install_requires.

from: How to specify version ranges in install_requires (setuptools, distribute)

Perhaps you need to be more specific. You probably end up with django v 1.9.5 right? Seems a bit stupid, but there's probably some reason for it!

Upvotes: 3

Related Questions