[英]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 我正在玩geodjango和django> 1.11给了我很多问题,所以我正在使用django 1.11
pip3 install django==1.11
now I am trying to install django-leaflet 现在我正在尝试安装django-leaflet
which I installed 我安装了
like 喜欢
pip3 install django-leaflet
but this command upgraded to django 2 and broke my app. 但是此命令升级到django 2并破坏了我的应用程序。
so how do I install django-leaflet without upgrading my django 所以我该如何安装django-leaflet而不升级我的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 您会看到它安装了django 2.0.7,我不希望它
Generally speaking, the dependency django
only installed when it fail to detect any django
installed in your system. 一般来说,依赖项
django
仅在无法检测到系统中安装的任何django
时才安装。
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: 无论如何,如果可以使用
python3 -c 'import django'
pip3
python3 -c 'import django'
确认已经安装了python3 -c 'import django'
,则可以通过以下命令强制pip3
不安装任何新的django
:
pip3 install --no-deps django-leaflet==0.22.0
But you have to install all dependency by yourself. 但是您必须自己安装所有依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.