ModuleNotFoundError:没有名为"django.utils.six"的模块 [英] ModuleNotFoundError: No module named 'django.utils.six'

查看:90
本文介绍了ModuleNotFoundError:没有名为"django.utils.six"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTTP GET/admin/500 [0.00,127.0.0.1:51425]追溯(最近一次通话):正在处理文件"C:\ Program Files(x86)\ Microsoft Visual Studio \ Shared \ Python37_64 \ lib \ site-packages \ daphne \ http_protocol.py",行180服务器":self.server_addr,ModuleNotFoundError:没有名为"django.utils.six"的模块

HTTP GET /admin/ 500 [0.00, 127.0.0.1:51425] Traceback (most recent call last): File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\daphne\http_protocol.py", line 180, in process "server": self.server_addr, ModuleNotFoundError: No module named 'django.utils.six'

已安装Django3.不再支持Django.utils.six.有想法吗?

Installed Django 3. Django.utils.six is no longer supported. Thoughts?

推荐答案

Django 3已从

Django 3 has removed support for six, from the release notes:

在Django 2.0中删除了对Python 2的支持后,并未从Django中删除了一些私有API,以便第三方应用程序可以继续使用它们,直到Python 2终止使用为止.

While Python 2 support was removed in Django 2.0, some private APIs weren’t removed from Django so that third party apps could continue using them until the Python 2 end-of-life.

由于我们希望应用在添加对Django 3.0的支持时会降低Python 2的兼容性,因此我们目前正在删除这些API.

Since we expect apps to drop Python 2 compatibility when adding support for Django 3.0, we’re removing these APIs at this time.

...

django.utils.six-删除此供应商库的使用或切换到六个.

django.utils.six - Remove usage of this vendored library or switch to six.

这篇关于ModuleNotFoundError:没有名为"django.utils.six"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆