[Python] python error: CommandError: You appear not to have the 'psql' program installed or on...

Discussão em 'Python' iniciado por Stack, Fevereiro 28, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using MacOs, have a virtualenv. I have psycopg2 installed with Pip, and the latest version of PostgreSQL installed as well.

    When I run python manage.py dbshell, I get the following error:

    CommandError: You appear not to have the 'psql' program installed or on your path.


    I have read a few other posts on this error like this (CommandError: You appear not to have the 'psql' program installed or on your path) but I don't understand why this is not working for me. I have all the settings properly configured, and all the proper apps installed.

    My settings.py: '''

    DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': 'db_stationery',
    'USER': 'postgres',
    'PASSWORD': '******',
    'HOST': 'localhost',
    'PORT': '5432',}}

    Continue reading...

Compartilhe esta Página