zoukankan      html  css  js  c++  java
  • ModuleNotFoundError: No module named 'email.utils'问题

    D:python_learnmeiduo_projectenvScriptspython.exe D:/python_learn/meiduo_project/meiduo_mall/manage.py runserver 8000
    Traceback (most recent call last):
    File "D:/python_learn/meiduo_project/meiduo_mall/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangocoremanagement\__init__.py", line 13, in <module>
    from django.core.management.base import (
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangocoremanagementase.py", line 17, in <module>
    from django.db.migrations.exceptions import MigrationSchemaMissing
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmigrations\__init__.py", line 2, in <module>
    from .operations import * # NOQA
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmigrationsoperations\__init__.py", line 1, in <module>
    from .fields import AddField, AlterField, RemoveField, RenameField
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmigrationsoperationsfields.py", line 4, in <module>
    from django.db.models.fields import NOT_PROVIDED
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmodels\__init__.py", line 3, in <module>
    from django.db.models.aggregates import * # NOQA
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmodelsaggregates.py", line 5, in <module>
    from django.db.models.expressions import Func, Star
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmodelsexpressions.py", line 6, in <module>
    from django.db.models import fields
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangodbmodelsfields\__init__.py", line 14, in <module>
    from django import forms
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangoforms\__init__.py", line 6, in <module>
    from django.forms.boundfield import * # NOQA
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangoformsoundfield.py", line 6, in <module>
    from django.forms.utils import flatatt, pretty_name
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangoformsutils.py", line 10, in <module>
    from django.utils.html import escape, format_html, format_html_join, html_safe
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangoutilshtml.py", line 10, in <module>
    from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDELIMS
    File "D:python_learnmeiduo_projectenvlibsite-packagesdjangoutilshttp.py", line 11, in <module>
    from email.utils import formatdate
    ModuleNotFoundError: No module named 'email.utils'
    
    Process finished with exit code 1

    把自己定义的叫email的包改成其他名称,自己定义的名称和系统名称冲突了.

    在pycharm中修改包的名称的时候千万不要点跟随修改,这样会把模块内的其他引用email功能的其他包都改成新改的包名,然后问题就麻烦了.

  • 相关阅读:
    关于Linux静态库和动态库的分析
    某个表格不知道被哪个Session 锁住了,及如何解锁
    如何降低索引的clustering_factor
    Oracle Logminer 查找日志信息
    使用“alter index ××× monitoring usage;”语句监控索引使用与否(转载secooler) 转
    Oracle提高查询效率的解析
    数据库flash_recovery_area满导致数据库启动报错ORA03113错误
    ora错误代码汇总
    Oracle BBED 工具介绍
    oracle BBED 直接修改数据库block块
  • 原文地址:https://www.cnblogs.com/sewen-H/p/13339978.html
Copyright © 2011-2022 走看看