Hello, im trying to use postgres to my django app and im following a tutorial, im on an activated virtual enviroment and i’ve installed psycopg2==2.9.9
psycopg2-binary==2.9.9 (this is from my requirements.txt file)
then i modified the settings from my project to this
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.postgresql’,
‘NAME’: ‘commerce’,
‘USER’: ‘USER’,
‘PASSWORD’: ‘PASSWORD’,
}
}
and, since i was using sqlite im migrating the sqlite data to the postgres db and im using
python -Xutf8 manage.py dumpdata --indent=2 --output=commerce_data.json
then when i run that command im getting this
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module
i’ve installed via pip: pip install psycopg2-binary psycopg
what im doing wrong?
also, if i open a terminal and run something like this
import psycopg2
i get ModuleNotFoundError: No module named ‘psycopg2’