首页>>后端>>Python->python3.6对应哪个django(2023年最新分享)

python3.6对应哪个django(2023年最新分享)

时间:2023-12-13 本站 点击:0

导读:今天首席CTO笔记来给各位分享关于python3.6对应哪个django的相关内容,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

python3.6下如何用Django1.9创建数据库报错

错误描述

python==3.5

django==1.7

django创建项目时报错如下:

Traceback (most recent call last):

File "/root/envs/django-test/bin/django-admin", line 11, in module

sys.exit(execute_from_command_line())

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line

utility.execute()

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/management/__init__.py", line 354, in execute

django.setup()

File "/root/envs/django-test/lib/python3.5/site-packages/django/__init__.py", line 18, in setup

from django.utils.log import configure_logging

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/log.py", line 10, in module

from django.views.debug import ExceptionReporter, get_exception_reporter_filter

File "/root/envs/django-test/lib/python3.5/site-packages/django/views/debug.py", line 10, in module

from django.http import (HttpResponse, HttpResponseServerError,

File "/root/envs/django-test/lib/python3.5/site-packages/django/http/__init__.py", line 4, in module

from django.http.response import (HttpResponse, StreamingHttpResponse,

File "/root/envs/django-test/lib/python3.5/site-packages/django/http/response.py", line 13, in module

from django.core.serializers.json import DjangoJSONEncoder

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/serializers/__init__.py", line 23, in module

from django.core.serializers.base import SerializerDoesNotExist

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/serializers/base.py", line 6, in module

from django.db import models

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/__init__.py", line 6, in module

from django.db.models.query import Q, QuerySet, Prefetch # NOQA

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/query.py", line 13, in module

from django.db.models.fields import AutoField, Empty

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/fields/__init__.py", line 18, in module

from django import forms

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/__init__.py", line 6, in module

from django.forms.fields import * # NOQA

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/fields.py", line 18, in module

from django.forms.utils import from_current_timezone, to_current_timezone

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/utils.py", line 15, in module

from django.utils.html import format_html, format_html_join, escape

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/html.py", line 16, in module

from .html_parser import HTMLParser, HTMLParseError

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/html_parser.py", line 12, in module

HTMLParseError = _html_parser.HTMLParseError

AttributeError: module 'html.parser' has no attribute 'HTMLParseError'

(django-test) root@localhost:~/source/djangotest# django-admin startproject superlists

Traceback (most recent call last):

File "/root/envs/django-test/bin/django-admin", line 11, in module

sys.exit(execute_from_command_line())

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line

utility.execute()

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/management/__init__.py", line 354, in execute

django.setup()

File "/root/envs/django-test/lib/python3.5/site-packages/django/__init__.py", line 18, in setup

from django.utils.log import configure_logging

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/log.py", line 10, in module

from django.views.debug import ExceptionReporter, get_exception_reporter_filter

File "/root/envs/django-test/lib/python3.5/site-packages/django/views/debug.py", line 10, in module

from django.http import (HttpResponse, HttpResponseServerError,

File "/root/envs/django-test/lib/python3.5/site-packages/django/http/__init__.py", line 4, in module

from django.http.response import (HttpResponse, StreamingHttpResponse,

File "/root/envs/django-test/lib/python3.5/site-packages/django/http/response.py", line 13, in module

from django.core.serializers.json import DjangoJSONEncoder

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/serializers/__init__.py", line 23, in module

from django.core.serializers.base import SerializerDoesNotExist

File "/root/envs/django-test/lib/python3.5/site-packages/django/core/serializers/base.py", line 6, in module

from django.db import models

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/__init__.py", line 6, in module

from django.db.models.query import Q, QuerySet, Prefetch # NOQA

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/query.py", line 13, in module

from django.db.models.fields import AutoField, Empty

File "/root/envs/django-test/lib/python3.5/site-packages/django/db/models/fields/__init__.py", line 18, in module

from django import forms

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/__init__.py", line 6, in module

from django.forms.fields import * # NOQA

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/fields.py", line 18, in module

from django.forms.utils import from_current_timezone, to_current_timezone

File "/root/envs/django-test/lib/python3.5/site-packages/django/forms/utils.py", line 15, in module

from django.utils.html import format_html, format_html_join, escape

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/html.py", line 16, in module

from .html_parser import HTMLParser, HTMLParseError

File "/root/envs/django-test/lib/python3.5/site-packages/django/utils/html_parser.py", line 12, in module

HTMLParseError = _html_parser.HTMLParseError

AttributeError: module 'html.parser' has no attribute 'HTMLParseError'12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576771234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677

原因

HTMLParseError在pythons3.5已经没有了

解决方法

将python版本回退到3.3或3.4

升级django版本

python3.6中django为什么没有了include

应该是你的DJANGO版本问题,与python版本没有关系。

不知道你是不是安装的django 2.0版本,可以试下低一点的版本,比如1.11.5

django web开发python用什么版本最好

python2.7和python3都是支持django的,鉴于python2.7大限已到,推荐用python3

Python3.6使用Django框架中使用Pandas的DataFrame函数没有奏效问题

框架不支持,或者说其与框架不兼容

Django是一个开放源代码的Web应用框架,由Python写成。采用了MT'V的框架模式,即模型M,模板T和视图V。它最初是被开发来用于管理劳伦斯出版集团旗下的一些以新闻内容为主的网站的,即是CMS(内容管理系统)软件。并于2005年7月在BSD许可证下发布。这套框架是以比利时的吉普赛爵士吉他手Django Reinhardt来命名的。

python3.6安装django2.0.4报错

程序猿的工作真的很辛苦,看着这些代码我头都大了,只是我不懂代码,不然可以和你探讨一下

结语:以上就是首席CTO笔记为大家介绍的关于python3.6对应哪个django的全部内容了,希望对大家有所帮助,如果你还想了解更多这方面的信息,记得收藏关注本站。


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:/Python/31023.html