$ python3 manage.py makemigrations blog
Traceback (most recent call last):
File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Users/katharine/Desktop/django/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/katharine/Desktop/django/django/core/management/init.py", line 395, in execute
django.setup()
File "/Users/katharine/Desktop/django/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/katharine/Desktop/django/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/katharine/Desktop/django/django/apps/config.py", line 300, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/katharine/Desktop/Katharine/blog/models.py", line 9, in
from mdeditor.fields import MDTextField
File "/usr/local/lib/python3.8/site-packages/mdeditor/fields.py", line 6, in
from .widgets import MDEditorWidget
File "/usr/local/lib/python3.8/site-packages/mdeditor/widgets.py", line 6, in
from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/Users/katharine/Desktop/django/django/utils/encoding.py)
$ python3 manage.py makemigrations blog Traceback (most recent call last): File "manage.py", line 22, in
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Users/katharine/Desktop/django/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/katharine/Desktop/django/django/core/management/init.py", line 395, in execute
django.setup()
File "/Users/katharine/Desktop/django/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/katharine/Desktop/django/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/Users/katharine/Desktop/django/django/apps/config.py", line 300, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/Cellar/python@3.8/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/katharine/Desktop/Katharine/blog/models.py", line 9, in
from mdeditor.fields import MDTextField
File "/usr/local/lib/python3.8/site-packages/mdeditor/fields.py", line 6, in
from .widgets import MDEditorWidget
File "/usr/local/lib/python3.8/site-packages/mdeditor/widgets.py", line 6, in
from django.utils.encoding import force_text
ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/Users/katharine/Desktop/django/django/utils/encoding.py)
How to fix it?