ImportError: symbol not found in flat namespace '_PQbackendPID' - Mailing list psycopg

From Gil Sousa
Subject ImportError: symbol not found in flat namespace '_PQbackendPID'
Date
Msg-id CAOUL5-rK5Z8TfztbFo-uPOb37kjb9kcNiGUGZ7RKPSwny4X+Kg@mail.gmail.com
Whole thread Raw
Responses Re: ImportError: symbol not found in flat namespace '_PQbackendPID'  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List psycopg
Hi all,

I am trying to use psycopg2 for the very first time, though I am stumbling with an error when trying to import the module:

✗ python3.9 radars_import.py    
Traceback (most recent call last):
  File "/Users/gilsousa/Documents/git Projects/ReportGen/radars_import.py", line 2, in <module>
    import psycopg2
  File "/Users/gilsousa/Library/Python/3.9/lib/python/site-packages/psycopg2/__init__.py", line 51, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: dlopen(/Users/gilsousa/Library/Python/3.9/lib/python/site-packages/psycopg2/_psycopg.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_PQbackendPID'

I made sure that I have the packages installed, both psycopg2 and psycopg2-binary. I even tried to uninstall both and just try one at a time, also didn't work.

How can I fix this problem?

Thank you,

psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Psycopg 3.1 released
Next
From: Daniele Varrazzo
Date:
Subject: Re: ImportError: symbol not found in flat namespace '_PQbackendPID'