gpt4 book ai didi

python - ModuleNotFoundError : No module named 'django.utils.six'

转载 作者:行者123 更新时间:2023-12-02 02:41:00 27 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





ImportError: cannot import name 'six' from 'django.utils'

(17 个回答)


2年前关闭。




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”的模块

已安装 Django 3。不再支持 Django.utils.six。想法?

最佳答案

Django 3 移除了对 six 的支持,来自 release notes :

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.

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 - Remove usage of this vendored library or switch to six.

关于python - ModuleNotFoundError : No module named 'django.utils.six' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59524941/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com