“Django常见问题”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
docker>Evan
(创建页面,内容为“<pre> 运行什么都这样   Traceback (most recent call last): File "/home/evan/.local/lib/python2.7/site-packages/django/bin/django-admin.py", line 2, in <...”)
 
 
(未显示同一用户的2个中间版本)
第22行: 第22行:
  
 
</pre>
 
</pre>
 +
=Can't install Django 2.0 by pip =
 +
<pre>
 +
Can't install Django 2.0 by pip
  
 +
 +
 +
Django 2.x is not supported using Python 2.x.
 +
 +
From the Django download page:
 +
 +
    We recommend using the latest version of Python 3. The last version to support Python 2.7 is Django 1.11 LTS.
 +
 +
You should use Python 3.x with Pip3:
 +
 +
pip3 install django==2.2.13
 +
 +
 +
 +
</pre>
 +
 +
https://stackoverflow.com/questions/48932445/cant-install-django-2-0-by-pip
 
  [[category:django]]
 
  [[category:django]]

2020年9月8日 (二) 05:50的最新版本

运行什么都这样  

Traceback (most recent call last):
  File "/home/evan/.local/lib/python2.7/site-packages/django/bin/django-admin.py", line 2, in <module>
    from django.core import management
  File "/home/evan/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 10, in <module>
    from django.apps import apps
  File "/home/evan/.local/lib/python2.7/site-packages/django/apps/__init__.py", line 1, in <module>
    from .config import AppConfig
  File "/home/evan/.local/lib/python2.7/site-packages/django/apps/config.py", line 6, in <module>
    from django.utils.module_loading import module_has_submodule
  File "/home/evan/.local/lib/python2.7/site-packages/django/utils/module_loading.py", line 4, in <module>
    from importlib import import_module
  File "/home/evan/.local/lib/python2.7/site-packages/django/utils/importlib.py", line 6, in <module>
    from django.utils.deprecation import RemovedInDjango19Warning
ImportError: cannot import name RemovedInDjango19Warning

原来是 django 变成  1.10 而不是原来的 1.8
原因 
安装 pip install django-simple-captcha, pip install Pillow

Can't install Django 2.0 by pip

Can't install Django 2.0 by pip



Django 2.x is not supported using Python 2.x.

From the Django download page:

    We recommend using the latest version of Python 3. The last version to support Python 2.7 is Django 1.11 LTS.

You should use Python 3.x with Pip3:

pip3 install django==2.2.13



https://stackoverflow.com/questions/48932445/cant-install-django-2-0-by-pip