0

My python version is 3.10 and postgre version is 14 I am working on django, there I got an issue that is:

my settings.py

    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'testdb', 
        'USER': 'postgres', 
        'PASSWORD': 'xxxx',
        'HOST': '127.0.0.1', 
        'PORT': '5432',
    }
}

when I write this command;

python manage.py runserver

it says, Error loading psycopg2 module: No module named 'psycopg2'

then I run the command to install psycopg2

pip install psycog2

successfully installed the psycopg2

but after I run the

python manage.py runserver it shows the error;

AssertionError: database connection isn't set to UTC

I found the solution that downgrade your psycopg2 version to 2.8.6

So I uninstall and run the command again;

pip install psycopg2==2.8.6

but after that, it shows the error when I run the server

Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found.

please help me with that I am new to python

thanks in advance

0 Answers0