Forums

ModuleNotFoundError: ModuleNotFoundError: No module named 'rest_framework'

I tried to deploy my DRF app but i get this error: ModuleNotFoundError: No module named 'rest_framework' I work on virtual env and added in web tab like this: - Virtualenv: - Use a virtualenv to get different versions of flask, django etc from our default system ones. More info here. You need to Reload your web app to activate it; NB - will do nothing if the virtualenv does not exist. - /home/myname/.virtualenvs/envpy36/ then reload my site but i still get this error.

Could you help me please? Thanks in advance ^^.

Replace myname with baphuc1998

You might also need to run this in bash:

source ~/.virtualenvs/envpy36/bin/activate
pip install djangorestframework
deactivate

You can also open a bash console with your virtualenv already activated by clicking the "Start a bash console in this virtualenv" link on the "Web" page -- then you can just run the "pip install" command that @dull recommends without needing the other two commands.