ImportError: symbol not found in flat namespace '_PQbackendPID'

From: Gil Sousa <gilsousa(at)gmail(dot)com>
To: psycopg(at)lists(dot)postgresql(dot)org
Subject: ImportError: symbol not found in flat namespace '_PQbackendPID'
Date: 2022-09-06 16:06:28
Message-ID: CAOUL5-rK5Z8TfztbFo-uPOb37kjb9kcNiGUGZ7RKPSwny4X+Kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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,

Gil Sousa
www.gilsousa.eu

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2022-09-07 00:08:18 Re: ImportError: symbol not found in flat namespace '_PQbackendPID'
Previous Message Daniele Varrazzo 2022-08-30 16:03:52 Psycopg 3.1 released