简体   繁体   中英

Django version downgraded when I install third party Django package

When we upgrade Django version this two packages prompted incompatible

Installing collected packages: django
  Attempting uninstall: django
    Found existing installation: Django 3.1.6
    Uninstalling Django-3.1.6:
      Successfully uninstalled Django-3.1.6
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the foll
owing dependency conflicts.
django-helpdesk 0.3.4 requires Django<4,>=2.2, but you have django 4.0.4 which is incompatible.
django-celery-beat 2.2.1 requires Django<4.0,>=2.2, but you have django 4.0.4 which is incompatible.
Successfully installed django-4.0.4

When we try to upgrade packages(django-helpdesk) django core version was downgraded. Is this not a bug?

pip install django-helpdesk --upgrade
--------
--------
--------
Installing collected packages: Django
  Attempting uninstall: Django
    Found existing installation: Django 4.0.4
    Uninstalling Django-4.0.4:
      Successfully uninstalled Django-4.0.4
Successfully installed Django-3.2.13

Please help me

Not an bug, as helpdesk requires Django 2.2 LTS or 3.2 LTS . So it automatically set it for you when you tried to install/upgrade it.

But as your package showing incompatible there, you can do: pip install django==(<4.0,>=2.2)

for example: pip install django==3.2 I hope this would work for you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM