I tried to start my Celery worker like this celery -A backend worker -l info
but I got this error
ModuleNotFoundError: No module named 'rest_framework'
I'm using Poetry and I already have my virtual environment activated and it was included in my pyproject.toml
python = "^3.9"
aiohttp = "^3.7.4"
six = "^1.16.0"
Django = "^3.2.5"
djangorestframework = "^3.12.4"
python-dotenv = "^0.19.0"
psycopg2 = "^2.9.1"
celery = "^5.1.2"
redis = "^3.5.3"
So then I ran pip install djangorestframework
and the error went away but I got a new error
ModuleNotFoundError: No module named 'psycopg2'
Which I also solved with pip install psycopg2
, but it doesn't make sense why I have to do this for Celery to work? Before I could start my Django backend without this so I know my dependencies are there and from pyproject.toml
as well