Getting error cannot import name 'six' from 'django.utils' when using Django 3.0.0 latest version

前端 未结 5 1848
梦毁少年i
梦毁少年i 2020-12-10 13:18

Currently I have upgraded version of Django 2.2 to 3.0 and suddenly getting error like below.

ImportError: cannot import name \'six\' from \'django.ut

5条回答
  •  旧巷少年郎
    2020-12-10 14:04

    in order to use the six module you can install it directly using pip and then modify the django-jsonfield package accordingly . What I mean is find the files in the package where there is from django.utils import six and replace them with import six. Then it should be working. I faced the same issue when using djongo with django 3.0. I found the respective file and replaced it with the above suggestion. Please note that it is never recommended to do this if you are working on a production level or enterprise level project. I did it for my pet project.

提交回复
热议问题