qg_java_17137
qg_java_17137

Reputation: 3569

Have updated the django-rest-framework to last version, why there still have the `No module named 'django.core.urlresolvers'` error?

Have updated the django-rest-framework to last version, why there still have the error?

ImportError: No module named 'django.core.urlresolvers'

From the post:

https://stackoverflow.com/a/47330759/7646621

I have update the djangorestframework to the version 3.8.2.

But the issue still exists.

 File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/rest_framework_docs/urls.py", line 2, in <module>
    from rest_framework_docs.views import DRFDocsView
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/rest_framework_docs/views.py", line 3, in <module>
    from rest_framework_docs.api_docs import ApiDocumentation
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/rest_framework_docs/api_docs.py", line 3, in <module>
    from django.core.urlresolvers import RegexURLResolver, RegexURLPattern
ImportError: No module named 'django.core.urlresolvers'

my Django version is Version: 2.0.6.

Upvotes: 1

Views: 910

Answers (2)

aircraft
aircraft

Reputation: 26886

From the drfdocs https://www.drfdocs.com/installation/:

you can upgrade it by:

pip install --upgrade drfdocs

Upvotes: 1

Linovia
Linovia

Reputation: 20966

You need to upgrade rest_framework_docs as well.

Upvotes: 1

Related Questions