I'm getting this error in VS Code:
error: "Unable to import 'rest_framework'pylint(import-error)"
I've installed djangorestframework with pip in my virtual environment. I activated the environment before installing it but when I try to import django_rest_framework in my app "book", it says that can't import it. I've added the rest framework in my installed apps but I don't know which is the problem.
I'm working with django 2.1.5 and djangorestframework 3.9.3 and python 3.6.7 and pip3 19.1.1 I've checked with pip freeze and it's installed. The virtual environment is activated.
What could be the problem? I opened in PyCharm but i got the same error
Code from I'm getting the importation error in my serializer.py file that is in my app called "book"
from rest_framework import viewsets
from .models import Book
from .serializer import BookSerializer
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'book',
]