I've installed django rest framework using pip install djangorestframework
yet I still get this error when I run "python3 manage.py sycndb":
ImportError: No module named 'rest_framework'
I'm using python3, is this my issue?
I've installed django rest framework using pip install djangorestframework
yet I still get this error when I run "python3 manage.py sycndb":
ImportError: No module named 'rest_framework'
I'm using python3, is this my issue?
Yeh for me it was the python version as well ...
much better to use pipenv ...
create a virtual env using using python 3 ...
install pipenv :
pip3 install pipenv
create the virtualenv:
pipenv --python 3
activate the virtual env:
pipenv shell
(I would assume that folks using containers know what they're doing, but here's my two cents)
Let's say you setup your project using cookiecutter-django and enabled the docker container support, be sure to update the pip requirements file with
djangorestframework==<x.yy.z>
(or whichever python dependency you're trying to install) and re-build the docker images (local and production).To install it, do the following:
We have to check for a few common mistakes:
check comma at installed list elements
typo errors
On Windows, with PowerShell, I had to close and reopen the console and then reactive the virtual environment.
I've faced the same problem, followed these instructions and it worked for me:
python -m pip install --upgrade pip
(to upgrade pip)pip3 install djangorestframework
Added
rest_framework
as first app:Try pressing the icon given if you are getting the following error:
It will ask you to import the given package, that is
rest_framework
and run the code again.This worked for me and trying to solve that error for a couple of days.