Answer the question
In order to leave comments, you need to log in
Why does the error "Error loading psycopg2 module: No module named 'psycopg2'" occur when connecting a database?
I connect the database like this:
settings.py :
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',#пробовал и просто postgresql
'NAME': 'name',
'USER': 'postgres',
'PASSWORD': 'pass',
'HOST': '127.0.0.1',
'PORT': 5432,
}
}
Error loading psycopg2 module: No module named 'psycopg2. Makemigrations/migrations done. Superuser created. The database has new tables. If I comment out DATABASES, it starts without errors, but I do not get access to the database.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question