简体   繁体   中英

install django-leaflet to match django version

I am playing around with geodjango and django > 1.11 is giving me ton of problems so I am using django 1.11

pip3 install django==1.11

now I am trying to install django-leaflet

which I installed

like

pip3 install django-leaflet

but this command upgraded to django 2 and broke my app.

so how do I install django-leaflet without upgrading my django

$ pip3 install django-leaflet==0.22.0
Collecting django-leaflet==0.22.0
Collecting Django (from django-leaflet==0.22.0)
  Using cached https://files.pythonhosted.org/packages/ab/15/cfde97943f0db45e4f999c60b696fbb4df59e82bbccc686770f4e44c9094/Django-2.0.7-py3-none-any.whl
Collecting pytz (from Django->django-leaflet==0.22.0)
  Using cached https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl
Installing collected packages: pytz, Django, django-leaflet
Successfully installed Django-2.0.7 django-leaflet-0.24.0 pytz-2018.5

you see it installs django 2.0.7 which I DO NOT want it to

Generally speaking, the dependency django only installed when it fail to detect any django installed in your system.

Anyway, if you can confirm your django already installed with python3 -c 'import django' , then you can force pip3 not to install any new django by following command:

pip3 install --no-deps django-leaflet==0.22.0

But you have to install all dependency by yourself.

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