亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

django-admin startproject django_first創建項目報錯,求解

D:\pyProgram>django-admin startproject django_first

Traceback (most recent call last):

? File "D:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main

? ? return _run_code(code, main_globals, None,

? File "D:\Python\Python310\lib\runpy.py", line 86, in _run_code

? ? exec(code, run_globals)

? File "D:\Python\Python310\Scripts\django-admin.exe\__main__.py", line 7, in <module>

? File "D:\Python\Python310\lib\site-packages\django\core\management\__init__.py", line 371, in execute_from_command_line

? ? utility.execute()

? File "D:\Python\Python310\lib\site-packages\django\core\management\__init__.py", line 365, in execute

? ? self.fetch_command(subcommand).run_from_argv(self.argv)

? File "D:\Python\Python310\lib\site-packages\django\core\management\base.py", line 288, in run_from_argv

? ? self.execute(*args, **cmd_options)

? File "D:\Python\Python310\lib\site-packages\django\core\management\base.py", line 335, in execute

? ? output = self.handle(*args, **options)

? File "D:\Python\Python310\lib\site-packages\django\core\management\commands\startproject.py", line 20, in handle

? ? super().handle('project', project_name, target, **options)

? File "D:\Python\Python310\lib\site-packages\django\core\management\templates.py", line 118, in handle

? ? django.setup()

? File "D:\Python\Python310\lib\site-packages\django\__init__.py", line 16, in setup

? ? from django.urls import set_script_prefix

? File "D:\Python\Python310\lib\site-packages\django\urls\__init__.py", line 1, in <module>

? ? from .base import (

? File "D:\Python\Python310\lib\site-packages\django\urls\base.py", line 8, in <module>

? ? from .exceptions import NoReverseMatch, Resolver404

? File "D:\Python\Python310\lib\site-packages\django\urls\exceptions.py", line 1, in <module>

? ? from django.http import Http404

? File "D:\Python\Python310\lib\site-packages\django\http\__init__.py", line 5, in <module>

? ? from django.http.response import (

? File "D:\Python\Python310\lib\site-packages\django\http\response.py", line 13, in <module>

? ? from django.core.serializers.json import DjangoJSONEncoder

? File "D:\Python\Python310\lib\site-packages\django\core\serializers\__init__.py", line 23, in <module>

? ? from django.core.serializers.base import SerializerDoesNotExist

? File "D:\Python\Python310\lib\site-packages\django\core\serializers\base.py", line 6, in <module>

? ? from django.db import models

? File "D:\Python\Python310\lib\site-packages\django\db\models\__init__.py", line 3, in <module>

? ? from django.db.models.aggregates import *? # NOQA

? File "D:\Python\Python310\lib\site-packages\django\db\models\aggregates.py", line 5, in <module>

? ? from django.db.models.expressions import Case, Func, Star, When

? File "D:\Python\Python310\lib\site-packages\django\db\models\expressions.py", line 482, in <module>

? ? class TemporalSubtraction(CombinedExpression):

? File "D:\Python\Python310\lib\site-packages\django\db\models\expressions.py", line 483, in TemporalSubtraction

? ? output_field = fields.DurationField()

? File "D:\Python\Python310\lib\site-packages\django\db\models\fields\__init__.py", line 155, in __init__

? ? if isinstance(choices, collections.Iterator):

AttributeError: module 'collections' has no attribute 'Iterator'


正在回答

1 回答

解決了,是環境安裝問題,不能在系統的cmd窗口安裝django需要在conda的命令窗口安裝django

0 回復 有任何疑惑可以回復我~
#1

weixin_慕先生6065332

conda的命令窗口 是什么意思???
2022-06-05 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

django-admin startproject django_first創建項目報錯,求解

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號